Deadman Switch

Blast Futures Exchange offers “Deadman Switch” functionality to help prevent unexpected losses from network malfunctions. If you are putting up significant risk on Blast Futures Exchange, it can be nerve-wracking to think of what might happen if you or your datacenter loses connectivity.

The exchange will cancel all orders on all markets for your account if it has yet to receive any new/cancel/amend order requests for a period of time.

Activating Deadman Switch

GET /cancel_all_after

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.

POST /cancel_all_after
Params:
{
    timout: 600 // in milliseconds
}
Example response

{
    "success": true,
    "error": "",
    "result":
            {
                profile_id:1
                timeout:600 // in milliseconds
                last_updated: 1701324346000000
                status: "active" // status could be 'active' or 'canceled'
            }
}

Response: profile_id timeout last_updated status

DELETE /cancel_all_after

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 deadman switch after POST /cancel_all_after with period = 600

Step 2: Start sending any request from the list:

  1. POST /orders

  2. PUT /orders

  3. DELETE /orders

  4. DELETE /orders/cancel_all

  5. POST /cancel_all_after

Step 3: The system will check if, during a period of 600 milliseconds, any of the requests 1-5 is not received, and if so, it will cancel all orders on all markets.

Step 4: To deactivate the deadman switch send DELETE /cancel_all_after

Last updated