Trading

Kill switch

Cancels the user's open orders on a symbol if the command is not renewed within `timeout` seconds.

WSSwss://ws.bit2me.com/v1/tradingauto-cancel-orders-on-disconnection

Send the command with a timeout in seconds and send it again before that timeout expires. If no new auto-cancel-orders-on-disconnection arrives within timeout seconds, the server cancels the open orders on symbol created within deleteLast, or all of them when deleteLast is not sent. A timeout of 0 or less disables an active kill switch; it gets no reply when none is active.

Enables, renews or disables the auto-cancel on disconnection.

event*string
Valueauto-cancel-orders-on-disconnection
symbol*string

Market symbol as BASE/QUOTE, uppercase. The list of valid symbols is GET /v2/trading/market-config.

Match^[A-Z0-9]+/[A-Z0-9]+$
ExampleB2M/EUR
timeout*integer

Seconds. 0 or a negative value disables the kill switch.

deleteLast?object

Only orders created within this time are cancelled. All open orders on symbol when not sent.

Show properties
value*integer
unit*string

s seconds, m minutes, h hours, d days.

Value ins | m | h | d
{  "event": "auto-cancel-orders-on-disconnection",  "symbol": "B2M/EUR",  "timeout": 5,  "deleteLast": {    "value": 10,    "unit": "m"  }}
{  "event": "auto-cancel-orders-on-disconnection",  "status": "ok",  "currentTime": "2022-11-24T15:51:26.499Z",  "triggerTime": "2022-11-24T15:51:31.499Z"}