Place a new buy or sell order on an on-chain order book
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.
trading service enabled.
0x[a-fA-F0-9]{40}.BUY or SELL.LIMIT or MARKET.LIMIT orders. Numeric string.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.| Code | Status | Description |
|---|---|---|
ORDER_BOOK_NOT_FOUND | 404 | Order book does not exist |
ORDER_BOOK_INACTIVE | 400 | Order book is paused or closed |
INSUFFICIENT_BALANCE | 400 | User does not have sufficient balance |
INSUFFICIENT_CUSTODY_BALANCE | 400 | Insufficient balance in custody contract |
ORDER_TOO_SMALL | 400 | Order quantity below minimum |
ORDER_TOO_LARGE | 400 | Order quantity above maximum |
PRICE_REQUIRED | 400 | Price is required for limit orders |
INVALID_QUANTITY | 400 | Invalid quantity value |
INVALID_PRICE | 400 | Price does not align with tick size |
TRANSFER_RESTRICTED | 400 | User is not eligible to trade this token |
NO_CUSTODY_CONTRACT | 400 | Order book has no custody contract configured |