Orders
Submit Order
Place a new buy or sell order on an on-chain order book
POST
Submits a new order to an on-chain order book. Supports limit and market order types with configurable time-in-force, post-only, and self-trade prevention policies.
For
LIMIT orders, the price field is required and specifies the maximum (buy) or minimum (sell) acceptable price. MARKET orders execute immediately at the best available price.
The userAddress must be a verified on-chain identity with sufficient custody balance for sell orders, or sufficient quote token balance for buy orders. When the order book has a price reference enabled, orders priced outside the configured band are rejected.
Authentication
Requires an instance API key with thetrading service enabled.
Idempotency
This endpoint accepts an optionalIdempotency-Key header. When supplied, repeating a request with the same key and body returns the original result instead of placing a duplicate order. Reusing a key with a different body returns IDEMPOTENCY_MISMATCH.
Request Body
string
required
The target order book identifier. Max 100 characters.
string
required
EVM address of the trading user. Must match
0x[a-fA-F0-9]{40}.string
required
Order side. One of
BUY or SELL.string
required
Order type. One of
LIMIT or MARKET.string
Limit price in quote token base units (wei). Required for
LIMIT orders. Numeric string.string
required
Order quantity in base token units (wei). Numeric string.
string
Time-in-force policy. One of:
GTC- Good Till Cancelled (default). Remains on the book until filled or cancelled.IOC- Immediate or Cancel. Fills what it can immediately, cancels the rest.FOK- Fill or Kill. Must fill entirely or is rejected.
boolean
When
true, the order is rejected if it would match immediately as a taker. Use this to guarantee maker status. Defaults to false.string
Controls what happens when an order would match against another order from the same
userAddress. One of:NONE- Self-trades are allowed (default).CANCEL_TAKER- Cancel the incoming (taker) order.CANCEL_MAKER- Cancel the resting (maker) order.CANCEL_BOTH- Cancel both orders.
string
Optional signature over the order message, for instances that enforce signed orders. Max 256 characters.
string
Optional signed message payload associated with
signature. Max 512 characters.