cancel_order
Cancel a specific open order on your OctoBot-connected exchange by providing its order ID. Resolves issues when you need to remove an unwanted or erroneous order.
Instructions
Cancel one order by id.
Maps to POST /api/orders?action=cancel_order -- action is a query
parameter, not a JSON body field (confirmed against source, the same
pattern octobot_mcp.tools.tentacles.update_tentacle_config already
documents for its own route). The JSON body is the raw order_id value
itself, NOT wrapped in an object: confirmed against source
(Services/Interfaces/web_interface/api/trading.py::orders() does
interfaces_util.cancel_orders([flask.request.get_json()]), and
cancel_orders(order_ids) -- packages/services/octobot_services/ interfaces/util/order.py -- iterates its argument directly as a list of
order ids). Use the id field from get_orders()'s own response items
for this value.
Success: OctoBot returns HTTP 200 with the literal JSON string "Order cancelled", returned unchanged (NFR-8). Failure -- the order wasn't
found on any connected exchange, including the case where every
exchange manager tried raised an internal cancel error OctoBot itself
silently swallows rather than propagating (see this module's docstring)
-- raises OrderCancelRejectedError with OctoBot's own extracted error
text (always, in practice, the literal "Impossible to cancel order: order not found.").
Not confirm-gated: the user was explicitly asked about the spec's own
footnote flagging this tool as "revisitable" given its irreversible
effect, and chose to keep it ungated (milestone 13.6), per ADR-0003's
original reasoning that this is routine, expected trading-bot activity.
No confirm parameter exists on this tool at all.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| order_id | Yes |