binance_cancel_order_list
Cancel an entire Binance order list by its ID, removing all legs in one request. Pass the symbol with either order_list_id or list_client_order_id to pull a bracket order before replacing it.
Instructions
Cancel an ENTIRE order list — every leg of it — by id.
Calls DELETE /api/v3/orderList (SIGNED, IP weight 1). Pass the symbol plus exactly
one id: order_list_id or list_client_order_id. Both at once is rejected locally.
Kill-switch. Refused with Error: … trading is disabled … unless the server runs
with BINANCE_ALLOW_TRADING=1.
Cancelling is idempotent in effect: a second cancel of the same list returns -2011
("unknown order") and changes nothing. What it cannot undo is a fill — a leg that has
already triggered is gone, and its sibling with it. Note that cancelling ONE leg (via
binance_cancel_order) also cancels the whole list; this tool just makes the intent
explicit.
When to Use:
Pulling a bracket that is no longer wanted, before replacing it.
Cleaning up after a partial fill changed the position the bracket was sized for.
When NOT to Use:
To cancel everything on a symbol, lists included —
binance_cancel_all_open_orders(spot_orders.py) does it in one call.To see what would be cancelled —
binance_get_order_listfirst; that read is free of consequence and this one is not.
Returns:
A confirmation echoing the cancelled list: orderListId, contingencyType,
listStatusType, listOrderStatus and the ### Legs table from orderReports[] with
each leg's status (CANCELED) and its original client id.
Examples: params = {"symbol": "BTCUSDT", "order_list_id": 27} params = {"symbol": "BTCUSDT", "list_client_order_id": "btc-bracket-001", "new_client_order_id": "cancel-bracket-001"}
Error Handling:
-2011 means the list is not cancellable: it does not exist, already completed, or was
already cancelled. A 5xx/timeout leaves the cancel UNKNOWN: check with
binance_get_order_list before assuming either way — do not assume the legs are gone.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |