set_cancel_on_disconnect
Enable or disable cancel-on-disconnect to protect resting orders: arm the dead man's switch so the exchange cancels all orders if your WebSocket drops, or turn it off. State true or false explicitly.
Instructions
Enable or disable cancel-on-disconnect (COD) for the authenticated account. Pass enabled: true to arm the dead man's switch (the exchange cancels all resting orders when your authenticated WebSocket drops and does not reconnect within the grace window) or enabled: false to disable it. Off by default. enabled is required and explicit — there is no default — so every call states the intended state and an argless call is rejected rather than silently toggling. Returns the resulting COD status. Requires API credentials.
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": {
"enabled": "<enabled>"
},
"name": "set_cancel_on_disconnect"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| enabled | Yes | True to enable COD for the account, false to disable. |