cancel_order
Cancel one resting live-money order by its order ID from get_orders to remove a stale or mistaken order before it fills; include coin or asset if unknown.
Instructions
LIVE MONEY: acts on the real account. Cancel one resting order by its order id. order_id comes from get_orders; pass coin with it (asset, the numeric index, only when coin is unknown). Cancelling a position's only stop leaves it unprotected: to move a stop use set_stop, and to clear leftover orders on a flat coin use sweep_brackets. Use for a stale entry or a mistaken order. Needs a trading key. Returns {ok}; an order already filled or cancelled, or a missing coin and asset, returns the venue's {error} with isError true.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"order_id": "<order_id>"
},
"name": "cancel_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| coin | No | The order's coin, as in get_orders (BTC or xyz:GOLD). | |
| asset | No | Numeric asset index, only when coin is unknown. | |
| order_id | Yes | The order id (oid) from get_orders. |