Dead man's switch
POST/cancelallordersafter
This endpoint provides a Dead Man's Switch mechanism to protect the user from network malfunctions. The user can send a request with a timeout in seconds which will trigger a countdown timer that will cancel all user orders when timeout expires. The user has to keep sending request to push back the timeout expiration or they can deactivate the mechanism by specifying a timeout of zero (0).
The recommended mechanism usage is making a call every 15 to 20 seconds and provide a timeout of 60 seconds. This allows the user to keep the orders in place on a brief network failure, while keeping them safe in case of a network breakdown.
Request
- application/json
Body
required
The timeout specified in seconds.
Responses
- 200
- application/json
- Schema
- success
- cancel
- failure
Schema
- Success Response
- ErrorResponse
accountInactive
: The Futures account the request refers to is inactiveapiLimitExceeded
: The API limit for the calling IP address has been exceededauthenticationError
: The request could not be authenticatedinsufficientFunds
: The amount requested for transfer is below the amount of funds availableinvalidAccount
: The Futures account the transfer request refers to is invalidinvalidAmount
: The amount the transfer request refers to is invalidinvalidArgument
: One or more arguments provided are invalidinvalidUnit
: The unit the transfer request refers to is invalidJson Parse Error
: The request failed to pass valid JSON as an argumentmarketUnavailable
: The market is currently unavailablenonceBelowThreshold
: The provided nonce is below the thresholdnonceDuplicate
: The provided nonce is a duplicate as it has been used in a previous requestnotFound
: The requested information could not be foundrequiredArgumentMissing
: One or more required arguments are missingServer Error
: There was an error processing the requestUnavailable
: The endpoint being called is unavailableunknownError
: An unknown error has occurred
status object
The status of the switch.
The server date and time that server received the request.
The server date and time that the switch will be activated.
Possible values: [success
]
Server time in Coordinated Universal Time (UTC)
Possible values: [accountInactive
, apiLimitExceeded
, authenticationError
, insufficientFunds
, invalidAccount
, invalidAmount
, invalidArgument
, invalidUnit
, Json Parse Error
, marketUnavailable
, nonceBelowThreshold
, nonceDuplicate
, notFound
, requiredArgumentMissing
, Server Error
, Unavailable
, unknownError
]
Possible values: [accountInactive
, apiLimitExceeded
, authenticationError
, insufficientFunds
, invalidAccount
, invalidAmount
, invalidArgument
, invalidUnit
, Json Parse Error
, marketUnavailable
, nonceBelowThreshold
, nonceDuplicate
, notFound
, requiredArgumentMissing
, Server Error
, Unavailable
, unknownError
]
Error description.
Possible values: [error
]
Server time in Coordinated Universal Time (UTC)
{
"result": "success",
"status": {
"currentTime": "2018-06-19T16:51:23.839Z",
"triggerTime": "2018-06-19T16:52:23.839Z"
},
"serverTime": "2018-06-19T16:51:23.839Z"
}
{
"result": "success",
"status": {
"currentTime": "2018-06-19T16:51:23.839Z",
"triggerTime": "0"
},
"serverTime": "2018-06-19T16:51:23.839Z"
}
{
"result": "error",
"serverTime": "2016-02-25T09:45:53.818Z",
"error": "apiLimitExceeded"
}