Deadman Switch
RabbitX offers “Deadman Switch” functionality to help prevent unexpected losses from network malfunctions. If you are putting up significant risk on RabbitX, it can be nerve-wracking to think of what might happen if you or your datacenter loses connectivity.
Deadman switch automatically cancels all your orders after a certain period of time (minimum 1 ms) if you get disconnected from your. The deadman switch feature is set up such that if the client does not send any instructions/actions for orders for N seconds then the exchange will automatically cancel all open orders by the client immediately.
After activating the deadman switch, the exchange will cancel all orders for your account if it has yet to receive any actions including new/cancel/amend order requests for a period of time.
Activating Deadman Switch
Response: profile_id timeout last_updated status
GET /cancel_all_after response: profile_id timeout - in milliseconds last_updated - time in milliseconds when we saw requests from you status - the current status: "active" means that we see requests, "canceled" means that there were no requests during timeout and orders were cancelled. It will be automatically reactivated once any request is seen.
DELETE /cancel_all_after Response: (the deleted info) profile_id timeout last_updated status
Example: You want to activate the deadman switch to cancel all your orders if there is no activity for 6 seconds.
Step 1: Activate the the deadman switch after POST /cancel_all_after with period = 600
Step 2: Start sending any request from the list:
POST /orders
PUT /orders
DELETE /orders
DELETE /orders/cancel_all
POST /cancel_all_after
Step 3: The system will check if, during a period of 600 milliseconds, not any of 1-5 requests received, it will cancel all orders on all markets
Step 4: To deactivate the deadman switch, send DELETE /cancel_all_after
Last updated