Skip to main content
The cancelConditional action cancels a single conditional order by its order ID. It works for TP/SL orders and standalone trigger orders created via tpSl, and for trigger orders placed with order. You can cancel only your own orders. Use this action when you need to cancel a specific leg of a TP/SL setup; to cancel all TP/SL orders for a position at once, use cancelTpSl instead.

Endpoint

Request

All requests must include an ECDSA signature and a millisecond-precision nonce.

Action fields

string
required
type (required) — Fixed value: "cancelConditional".
int64
required
oid (required) — The conditional order ID to cancel, as an int64. Must be greater than 0; 0 returns 400 INVALID_PARAM. You receive this ID in the tpOrderId or slOrderId field of the tpSl response, or of the response to a trigger order placed with order. Untriggered conditional orders are also listed in userOrders.

Response

Success

Response fields

int
The number of orders cancelled. Always 1 on success for this action.
number
Present only when the request is rejected; a non-zero value means nothing was cancelled.
string
Present together with errorCode. The rejection reason.

Errors

Rejections

A rejection is returned with HTTP 200 and status: "ok" — the failure surfaces as a non-zero errorCode inside response.data, not as a top-level status: "error".

HTTP errors