Skip to main content
Cancel-on-disconnect (COD) automatically cancels a wallet’s resting orders, quotes, and trigger orders when its connection drops — protecting you from stale orders resting on the book after a network failure. On graceful server shutdown, COD-enabled connections are cancelled as well. COD is a persisted account setting, not a per-frame flag. Enable or disable it with private/set_cancel_on_disconnect:
  • The setting is stored against the wallet’s account settings and applied to every new connection at login — so once enabled it persists across reconnects until you disable it.
  • Calling private/set_cancel_on_disconnect requires the Trade(All) protocol scope on the signing session key (see Authentication). A read-only JWT session cannot toggle it.
  • The current value is reported on your account (cancel_on_disconnect) via the account read methods.
In v2 this was a family of enable/disable/set RPCs. In v3 there is a single private/set_cancel_on_disconnect method taking an enabled boolean, gated by the Trade(All) scope. If your integration references the older method names, migrate to this one.