order
Manage crypto trade operations with a single command: place, cancel, modify, batch, cancel all, countdown auto-cancel, and fetch open, detail, history, and fills.
Instructions
[VERB] Manage orders by intent: place/cancel/modify (single or batch via orders), cancelAll, countdownCancel, plus open/detail/history/fills reads. Writes honor dryRun/confirm/readOnly; cancelAll requires confirm.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| qty | No | Order size/quantity (the v3 API field name). | |
| side | No | buy or sell. | |
| view | No | summary (default) trims null fields to save tokens; full returns the untouched payload. | |
| limit | No | Limit per page Default:100. Maximum:100 | |
| price | No | Order price (limit orders). | |
| action | Yes | What to do — place: place an order (needs: category, symbol, qty, side, orderType) | cancel: cancel an order | modify: modify an order | cancelAll: cancel all orders (destructive) (needs: category) | countdownCancel: dead-man's-switch auto-cancel (needs: countdown) | open: list open orders | detail: one order's detail | history: historical orders (needs: category) | fills: fill history | maxOpen: max openable size (needs: category, symbol, orderType, side). Pass `orders` to batch place/cancel/modify. | |
| cursor | No | Cursor Pagination is implemented by omitting the cursor in the first query and applying the cursor from the previous query for subsequent pages | |
| dryRun | No | Preview the write without sending it. | |
| fields | No | Optional list (array or comma-separated string) of fields to keep on each returned row. | |
| orders | No | Array of order/cancel/modify objects. When present, place/cancel/modify route to the batch endpoint automatically. | |
| symbol | No | Trading pair, e.g. BTCUSDT. | |
| confirm | No | Required to execute cancelAll (destructive). | |
| endTime | No | End timestamp A Unix timestamp in milliseconds e.g.,1597026383085 | |
| orderId | No | Target order id for cancel/modify/detail. | |
| posSide | No | Position side long/short This field is required in hedge-mode position. Available only for futures | |
| stpMode | No | STP Mode(Self Trade Prevention) none: not setting STP(default) cancel_taker: cancel taker order cancel_maker: cancel maker order cancel_both: cancel both of taker and maker orders | |
| category | No | Product category, e.g. SPOT or USDT-FUTURES. | |
| fetchAll | No | history/fills only: walk the cursor to bounded completion (returns { items, pages, truncated }). | |
| stopLoss | No | Preset Stop-Loss Trigger Price | |
| clientOid | No | Idempotency key. Auto-generated for a single `place` when omitted (P7). | |
| countdown | No | Reconnect Window - Unit: seconds - Positive integer, range: [5, 60]. The minimum countdown is 5 second, and the maximum is 60 seconds. Filling in 0 cancels the countdown order cancellation function. | |
| orderType | No | limit or market. | |
| startTime | No | Start timestamp A Unix timestamp in milliseconds e.g.,1597026383085 | |
| autoCancel | No | Will the original order be canceled if the order modification fails yes: Cancel no: Not cancel(default) | |
| reduceOnly | No | Reduce-only identifier yes/no, default no; yes indicates that your position may only be reduced in size upon the activation of this order | |
| takeProfit | No | Preset Take-Profit Trigger Price | |
| slOrderType | No | Stop-Loss Trigger Strategy Order Type limit: Limit Order market: Market Order | |
| slTriggerBy | No | Preset Stop-Loss Trigger Type market: Market Price mark: Mark Price If not filled in, the default value is market price Note: This field is only valid for the contract business lines: USDT-Futures, COIN-Futures, and USDC-Futures | |
| timeInForce | No | Time in force ioc Immediate or cancel. It must be executed immediately, with any unfilled portion canceled. fok Fill or kill. It must be fully executed immediately, or it is canceled entirely. gtc Good 'til canceled. It remains active until it is either filled or manually canceled. post_only Post only. It will only be added to the order book as a maker. This field is required when orderType is limit. If omitted, it defaults to gtc | |
| tpOrderType | No | Take-Profit Trigger Strategy Order Type limit: Limit Order market: Market Order | |
| tpTriggerBy | No | Preset Take-Profit Trigger Type market: Market Price mark: Mark Price If not specified, the default value is market price Note: This field is only valid for the contract business lines: USDT-Futures, COIN-Futures, and USDC-Futures. | |
| slLimitPrice | No | Stop-Loss Strategy Order Execution Price This field is only valid for limit orders (when slOrderType=limit); it is ignored for market orders. | |
| tpLimitPrice | No | Take-Profit Strategy Order Execution Price This field is only valid for limit orders (when tpOrderType=limit); it is ignored for market orders. |