Order status matrix

A basic description of possible order statuses can be found here.

Order chaining

Each order sent to the platform must have a client order ID. Its uniqueness is checked within 24 hours of receipt of the initial order. The client order ID is used to link different orders together. For example to cancel an order, the client must send an order cancel request (with its own unique client order ID) that references the order to be canceled through its client order ID (or by the order ID returned by the platform). Such design allows users to send cancelation or modification (not yet supported) requests without waiting for confirmation of the initial order from the exchange.

ExecId

Each execution report will have its unique ExecId.

Order status matrices

The tables below show messages that must be sent between clients and the exchange in various trading scenarios.

Send new order

StepClient sendsExchange sendsClOrdIdOrderIdExecType (150)OrdStatus (39)OrderQtyCumQtyLeavesQtyLastQtyComment
1New Order Single ABC   10    
Scenario: Trading API rejects the order outright
2 ExecutionReportABC Rejected (8)Rejected (8)10000 
Scenario: API validation passed, order gets rejected by the trading engine
2 ExecutionReportABCXYZRejected (8)Rejected (8)10000 
Scenario: order is accepted and hits the book
2 ExecutionReportABCXYZNew (0)New (0)100100 

Note: if order gets matched immediately after hitting the book, the New / New message will be omitted.

Fills and partial fills

StepClient sendsExchange sendsClOrdIdOrderIdExecType (150)OrdStatus (39)OrderQtyCumQtyLeavesQtyLastQtyComment
1New Order Single ABC   10    
Precondition: order reaches the book and gets executed immediately or after resting in the book (mind the New/New message to be sent in the latter case)
Scenario: full execution
2 ExecutionReportABC XYZTrade (F)Filled (2)1010010 
Scenario: partial executions and then full execution
2 ExecutionReportABCXYZTrade (F)Partially filled (1)10282Partial fill for 2, 8 remains
3 ExecutionReportABCXYZTrade (F)Partially filled (1)10735Partial fill for 5, 3 remains
4 ExecutionReportABCXYZTrade (F)Filled (2)101003Partial fill for 3, order now filled completely
Scenario: IOC order partially filled upon hitting the book
2 ExecutionReportABCXYZTrade (F)Partially filled (1)10282Partial fill for 2, 8 remains 
3 ExecutionReportABCXYZCancelled (4)Cancelled (4)10200Remaining part of IOC order cancelled
Scenario: FOK order cannot be completely filled upon hitting the book
2 ExecutionReportABCXYZCancelled (4)Cancelled (4)10000 

Cancellation

StepClient sendsExchange sendsClOrdIdOrigClOrdIdOrderIdExecType (150)OrdStatus (39)OrderQtyCumQtyLeavesQtyLastQtyComment
1New Order Single ABC    10    
Precondition: order rests in the book, exchange assigned OrderId=XYZ
Scenario: cancellation requested, order to be cancelled not found
2CancelRequest CCCDDDZZZ      Client can send either OrigClOrdId or OrderId as reference to the initial order
3 Cancel RejectCCCDDDZZZ       
Scenario: order cancelled before execution
2CancelRequest CCCABC       Client can send either OrigClOrdId or OrderId as reference to the initial order
3 ExecutionReportCCCABCXYZCancelled (4)Cancelled (4)10000 
Scenario: order partially filled and then cancelled
2 ExecutionReportABC XYZTrade (F)Partially filled (1)10282Fill for 2, 8 remains
3 ExecutionReportABC XYZTrade (F)Partially filled (1)10735Fill for 5, 3 remains
4CancelRequest CCCABCXYZ      Client can send either OrigClOrdId or OrderId as reference to the initial order
5 ExecutionReportCCCABCXYZCancelled (4)Cancelled (4)10700 
Scenario: order partially filled after cancellation requested
2 ExecutionReportABC  XYZTrade (F)Partially filled (1)10 282Fill for 2, 8 remains
3CancelRequest CCCABCXYZ      Client can send either OrigClOrdId or OrderId as reference to the initial order
4 ExecutionReportABC XYZTrade (F)Partially filled (1)10735 
5 ExecutionReportCCCABCXYZCancelled (4)Cancelled (4)10700 
Scenario: order completely filled after cancellation requested
2 ExecutionReportABC  XYZTrade (F)Partially filled (1)10 282Fill for 2, 8 remains
3CancelRequest CCCABCXYZ      Client can send either OrigClOrdId or OrderId as reference to the initial order
4 ExecutionReportABC XYZTrade (F)Filled (2)101007Order filled completely 
5 CancelRejectCCCABCXYZ Filled (1)