Cancel all pending orders
DELETE/v1/trading/accounts/:account_id/orders
Cancels pending orders for the selected account. Depending on filters, this may include SLTP orders.
Runtime restrictions:
- unavailable if trade_mode is trading_disabled
Warning: If filter is set to ALL, the operation will also cancel
all Stop Loss and Take Profit orders.
This may leave open positions without risk protection.
Filtering mode:
- either use filter=all
- or use any valid combination of filtering parameters
Supported filters:
- instrument
- order_type
- side
Logical rules:
- filter=all cannot be combined with any other filter
- profitable and unprofitable are not applicable to pending orders
- MARKET is not applicable for pending orders
- if order_type is provided, allowed values for this method are:
- stop
- limit
- sltp
The method returns ACK response. Final transaction result is delivered through Server Events.
For fan-out bulk operations, the ACK response operation_id is the parent operation id. Each individual cancellation event in Server Events contains envelope-level correlation fields:
- parent_operation_id = ACK operation_id
- operation_id = unique id of the concrete order cancellation operation
Consistency and recovery notes:
- Closed positions and final-state orders are retained for 1 month (subject to clarification).
- If
operation_idis not received in the REST ACK response, or is not received in Server events subscription, or an unknownoperation_idis received, the client should restart Server events subscription and reconcile state using snapshots of currently open positions and pending orders.
trading_disabled applies only to:
- Trading domain
- Market History Data domain
- Server Events
Request
Responses
- 202
- 400
- 401
- 410
- 500
ACK
Bad Request
Possible reasons:
- bad request
- invalid filter combination
- trading disabled
Authorization failed
Invalid account
Internal Server Error
The server encountered an unexpected condition that prevented it from fulfilling the request.