Order status changes also stream live over the Orders WebSocket. When you track open orders from the stream, drop an order once its status becomes terminal (
ORDER_STATUS_FILLED, ORDER_STATUS_CANCELLED, or ORDER_STATUS_REJECTED).Available statuses
An attached bracket pair has its own pre-activation lifecycle —
pending_activation, active, never_activated — reported through the attachedBracket object on its entry order. Once active, the pair is an ordinary order and moves through the statuses above. See Bracket Orders.Cancellable statuses
Three statuses permit cancellation:ORDER_STATUS_PENDING, ORDER_STATUS_ACCEPTED, and ORDER_STATUS_PARTIALLY_FILLED.
Non-cancellable statuses
Four statuses prevent cancellation:ORDER_STATUS_FILLED, ORDER_STATUS_CANCELLED, ORDER_STATUS_REJECTED, and ORDER_STATUS_TERMINATED.
Cancellation reasons
When an order ends inORDER_STATUS_CANCELLED or ORDER_STATUS_REJECTED, the closeReason field on the order response carries a reason code explaining why. Below are a few common reasons you can act on. This list is not exhaustive and can grow.