v1

latestOpenAPI 3.0.02026-07-2471143147.5 KB
Orders

Cancel all TP/SL orders

Cancel all accepted TP/SL orders for an account in a specific market. Already triggered, executed, or previously cancelled records are left untouched.

Signature (required for non-JWT): Sign EIP-712 typed data (same domain as regular orders) with primaryType CancelAllTpslOrders: fields: account(address), marketId(uint64), deadline(uint32).

post/v1/orders/tpsl/cancel-all

Request body

accountstring

Account address that owns the orders

market_idstring uint64

Market ID to cancel TP/SL orders in (required, must be > 0)

signerstring

Signer address (session key) that signed this request

signaturestring byte

65-byte ECDSA signature (r+s+v) from signer over EIP-712 CancelAllTpslOrders typed data

deadlineinteger

Unix timestamp after which the signature expires

Example request

{
  "account": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
  "market_id": "1",
  "signer": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
}

Response

A successful response.

cancelled_countstring int64

Number of TP/SL orders cancelled by this call (0 if none were in 'accepted' status)

successboolean

Whether the cancel-all call succeeded

Example response

{
  "cancelled_count": "3"
}