OrdersService
Cancel Order
Cancel a single open order by order ID or client order ID. Supports optional subaccount and symbol scoping.
Method
POST
Path
/v1/orders/cancel
Visibility
Authentication
Session token or API key
MFA Requirement
Not required
POST
/v1/orders/cancel Request
Testnet
curl --request POST \ \
--url 'https://api.testnet.polyester.com/v1/orders/cancel' \
--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 '{
"orderId": "5USXJZmk",
"subaccountId": "45LUmqjT",
"symbol": "BTC-USDT"
}'Responses
{
"orderId": "5USXJZmk",
"status": "ACCEPTED",
"ts": "2025-01-01T00:00:00Z",
"tsNs": "1735689600000000000"
} clientOrderId string
Client order ID.
orderId string
Order ID as fixed64.
subaccountId string
Target sub-account numeric ID. When omitted, uses caller's root account.
symbol string
Optional symbol_id for routing; when omitted, resolved from order directory.
orderId string
Order ID as fixed64.
Example
5USXJZmk status enum
Cancellation submission outcome.
ACCEPTED
Example
ACCEPTED 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. |