OrdersService
Cancel All After (Dead-Man Switch)
Set or disable a dead-man switch timeout for automatic cancel-all. Supports optional symbol and side scope with idempotent heartbeat refresh.
Method
POST
Path
/v1/orders/cancel-all-after
Visibility
Authentication
Session token or API key
MFA Requirement
Not required
POST
/v1/orders/cancel-all-after Request
Testnet
curl --request POST \ \
--url 'https://api.testnet.polyester.com/v1/orders/cancel-all-after' \
--header 'Accept: */*' \
--header 'X-API-KEY-ID: YOUR_API_KEY_ID' \
--header 'X-API-TIMESTAMP: YOUR_API_TIMESTAMP' \
--header 'X-API-SIGNATURE: YOUR_API_SIGNATURE' \
--header 'Content-Type: application/json' \
--data '{
"requestId": "request_01J0EXAMPLE",
"side": "BUY",
"subaccountId": "45LUmqjT",
"symbol": "BTC-USDT",
"timeoutSec": 1
}'Responses
{
"effectiveTimeoutSec": 1,
"expiresAtTsNs": "1735689600000000000",
"status": "ARMED",
"ts": "2025-01-01T00:00:00Z",
"tsNs": "1735689600000000000"
} requestId string
Idempotency/trace key from caller (required).
side enum
Optional side filter for cancel-on-expiry.
subaccountId string
Target sub-account numeric ID. When omitted, uses caller's root account.
symbol string
Optional trading pair symbol, e.g. BTC-USDT.
timeoutSec integer (int32)
Heartbeat timeout in seconds. - 0 disables the dead-man switch for this account. - 10..120 arms or refreshes the switch.
effectiveTimeoutSec integer (int32)
Effective timeout in seconds (0 when disabled).
Example
1 expiresAtTsNs string
Expiry timestamp in epoch nanoseconds (0 when disabled).
Example
1735689600000000000 status enum
Dead-man switch state after applying the request.
ARMED DISABLED
Example
ARMED ts string
Server timestamp.
Example
2025-01-01T00:00:00Z tsNs string
Server timestamp as epoch nanoseconds (for bots).
Example
1735689600000000000| Key | Status | Error | When |
|---|---|---|---|
| unauthenticated | 401 | Unauthenticated | Authentication required. |
| permission-denied | 403 | Permission Denied | Permission denied. |
| invalid-argument | 400 | Invalid Argument | Invalid argument. |
| not-found | 404 | Not Found | Not found. |
| unavailable | 503 | Unavailable | Service unavailable. |