This endpoint requires signature authentication. See our comprehensive Authentication via Signatures guide for implementation details.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
Parameters
Required parameters
-
action
(object, required) — The schedule cancel action object containing:type
(string) — Must be"scheduleCancel"
time
(number, optional) — Unix timestamp in milliseconds when to cancel all orders. Omit to remove existing scheduled cancel
-
nonce
(number, required) — Current timestamp in milliseconds (must be recent) -
signature
(object, required) — EIP-712 signature of the action
Optional parameters
vaultAddress
(string, optional) — Address when trading on behalf of a vault or subaccountexpiresAfter
(number, optional) — Timestamp in milliseconds after which the request is rejected
Returns
Returns an object with scheduling status:status
—"ok"
if request processedresponse
— Contains operation details:type
—"scheduleCancel"
Scheduling rules
- Minimum delay — Scheduled time must be at least 5 seconds in the future
- Daily limit — Maximum 10 triggers per day (resets at 00:00 UTC)
- Cancel operation — Omit the
time
parameter to remove an existing scheduled cancel - Auto-execution — When triggered, cancels all open orders for the user
Example request
Response example
Use cases
- System failure protection — Automatically cancel orders if your trading system crashes
- Connection loss safety — Protect against network disconnections
- Daily trading limits — Schedule end-of-day order cleanup
- Risk management — Implement automatic position closure during maintenance
Best practices
- Regular heartbeats — Continuously push the scheduled cancel forward while your system is healthy
- Buffer time — Set cancellation time with enough buffer (e.g., 30-60 seconds)
- Monitor triggers — Track your daily trigger count to avoid hitting the limit
- Graceful shutdown — Remove scheduled cancels when intentionally stopping your system
The dead man’s switch is a critical safety feature. Always implement it in production trading systems to prevent orders from remaining open during system failures.
Remember the 10 triggers per day limit. If you hit this limit, you won’t be able to use the scheduled cancel feature until 00:00 UTC. Plan your heartbeat intervals accordingly.
Body
application/json
Current timestamp in milliseconds
EIP-712 signature of the action with r, s, v components
Address when trading on behalf of a vault or subaccount (optional)
Timestamp in milliseconds after which the request is rejected (optional)