Skip to main content
A safe stop is a client-side workflow: cancel open orders, then stop submitting new creates and replaces. There is no server-side account cancel-only or trading-halt mode. The only cancel-only-style flag in order flow is per-order reduce_only, which constrains exposure but does not halt an account.

Raw workflow

  1. Stop local create and replace producers.
  2. Record a cutoff max_ts.
  3. Send cancel-all with that cutoff.
  4. Keep the order-control or orders WebSocket open until terminal events arrive.
  5. Re-fetch complete account state and reconcile.
In-flight creates or replaces that were already accepted before max_ts can still race with the cancel. Watch the orders stream and refetch:

tpluspy

If using OrderBookClient(use_ws_control=True), send create, replace, and cancel through the same /control channel so responses carry the same connection context. On reconnect, do not resume from memory: fetch open orders, positions, inventory, margin, and recent user trades before restarting quoting. The /control channel also accepts CancelAllOrdersRequest, CancelAllOrdersForAssetRequest, and BatchCancelRequest raw messages, or v1 envelopes with request_id. Bulk cancel messages are acknowledged as submitted; reconcile individual order state through the orders stream and REST snapshots.

Reconciliation checklist

For market makers on sync books, also watch /sync/pending_settlements; a stopped quoting loop can still have settlement obligations for fills that already happened.