HyperCore orders¶
Place HyperCore orders through your agent — Edith signs and submits them for you, no per-order signature. Orders are gasless (HyperCore charges no gas) and carry the deployment's builder code.
Prerequisites¶
- An API key (or wallet-login JWT).
- A one-time agent approval, plus the builder-fee approval if the deployment charges one.
Place an order¶
curl -X POST https://photon.example.com/api/hypercore/order \
-H "api-key: $EDITH_API_KEY" -H "Content-Type: application/json" \
-d '{
"chainId": 10200001,
"orders": [{
"asset": 10000,
"isBuy": true,
"price": 24.7,
"size": 2.0,
"tif": "Ioc"
}]
}'
The txId tracks like any relay — poll Get transaction status
to EXECUTED, or receive it on a webhook /
WebSocket. Since HyperCore acceptance is
synchronous, an accepted order lands EXECUTED immediately with the exchange
response as the receipt; a rejected order (e.g. it wouldn't cross) is FAILED
with the reason.
Order fields¶
| Field | Meaning |
|---|---|
asset |
Asset index. Perps use their index; spot uses 10000 + pair index (Vector's spot quote resolves this for you). |
isBuy |
Buy or sell. |
price |
Limit price (quote per base). For a market-style fill, use an aggressive price with tif: "Ioc". |
size |
Base-asset amount. |
tif |
Ioc (fill-or-cancel-remainder), Gtc (rest on book), or Alo (post-only). Default Gtc. |
reduceOnly |
Optional; only reduces an existing position. |
Builder fee¶
Orders Edith signs carry the operator's builder code — a small fee
(builderFeeTenthsBp, in tenths of a basis point; 10 = 1 bp) paid to the
builder address. This is why the builder approval is a
prerequisite: the exchange rejects an order whose builder fee the user hasn't
authorized. Deployments that don't charge a fee leave the builder unset and
skip that approval.
Warning
Nonces are millisecond timestamps and Edith manages them monotonically per agent — you never set one. Submit orders promptly; a stale nonce is rejected.