Skip to main content
POST

Set or update a deadline

Send cancelAt as a Unix timestamp in milliseconds. It must be a whole number at least five seconds later than server time. Each successful request replaces your previous deadline. The timestamp below is an example; calculate a new one for each request.
Update the deadline early enough to allow for network delays and clock differences. If an update fails, stop placing new orders until an update succeeds. The API does not block new orders when the deadline passes.

Turn off the timer

Send an empty JSON object to remove your deadline:
This also succeeds if no deadline is set. Once the deadline passes and cancellation starts, updating or removing the deadline cannot stop it.

Authentication and results

Authenticate as the profile whose orders you want to cover. If you use a scoped API token, it needs the trading scope. Sign the exact JSON body and /heartbeats path; see HMAC request signing. This endpoint does not accept onBehalfOf: a partner token cannot set a deadline for a sub-account.
  • 200 OK: deadline set, updated, or removed. No response data is returned.
  • 400 Bad Request: cancelAt is invalid or too close to server time.
  • 401 Unauthorized: authentication or profile is missing.
  • 403 Forbidden: the API token lacks the trading scope.
  • 409 Conflict with errorCode: "cancellation_in_progress": the deadline passed and cancellation has started. Stop placing orders. You can set a new deadline after cancellation finishes.
Cancellation may take time, and some orders may remain open, especially orders submitted after the deadline. Do not assume every order was canceled. Check your orders in each market to see which are still open.

Authorizations

lmts-api-key
string
header
required

Scoped API token with HMAC-SHA256 signing. Requires three headers: lmts-api-key (token ID), lmts-timestamp (ISO-8601), lmts-signature (Base64-encoded HMAC). See Authentication docs for details.

Body

application/json

Include cancelAt to set or update a deadline; send {} to turn off the timer.

cancelAt
integer

Future Unix timestamp in milliseconds, at least five seconds after server time. Leave out to turn off the timer.

Example:

1800000010000

Response

Deadline set, updated, or removed; no response data