Cancel spot order
cancel_spot_orderCancel the unfilled remainder of a paper spot order to release reserved funds; provide an orderId from list_open_orders. Filled trades remain unchanged.
Instructions
Cancel the unfilled remainder of your paper spot order and release its reserved funds. Requires trade:spot scope; get orderId from list_open_orders. Does not reverse filled trades. Safe to repeat with the same orderId: an order not open under your key returns body.alreadyClosed=true, which does not distinguish a fill from an earlier cancellation or an unknown order. Use get_my_trades to check fills. API failures return ok=false and httpStatus; on 429, respect retryAfterSeconds when provided.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| orderId | Yes | Your paper spot order id from list_open_orders. | |
| agentTrace | No | Optional private trace metadata stored in the caller's ledger. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| body | No | ||
| httpStatus | Yes | ||
| ledgerStatus | No | ||
| ledgerEventId | No |