The following matrices are included to clarify the sequence of messages and the status of orders involved in the submission and processing of new orders, executions, cancel requests and cancel/replace requests.
These state diagrams are presented from the broker’s view. (Note: x refers to the original order, y refers to the cancel/replacing order)
- Filled Order
- Partially Filled Order
- Canceled Order
- Partially Filled Order followed by Replace Request to Decrease Order Quantity
- Replaced Order
- Filled Order followed by a CancelReject
- Partially Filled Order followed by a Cancel Request
- Partially Filled Order followed by Replace Request to Increase Quantity
- Filled Order followed by Replace Request to Increase Quantity
- Rejected Order due to Duplicate ClOrdID
Any fills which occur and need to be communicated to the customer while an order is 'pending' and
waiting to achieve a new state (i.e. via a Order Cancel Replace (aka Order Modification) Request <G>)
must contain the "original" (current order prior to state change request) order parameters (i.e.
ClOrdID <11>, OrderQty <38>, LeavesQty <151>, Price <44>, etc). An order cannot be considered replaced until it has
been explicitly accepted and confirmed to have reached the replaced status (i.e OrdStatus <39> ='Replaced')--Care should be taken as the replaced order could still have reports coming which will
update the CumQty <14> and AvgPx <6> of both the original and replacement, however, the effect on the
replacement (ClOrdID <11>, new quantity or limit price, etc.) will not be seen until a report on the
replacement has been generated.
When a 'Fill Or Kill' (FOK) order cannot be filled or an 'Immediate Or Cancel' (IOC) order cannot be
Immediately hit, the proper response to "kill" the order is an ExecutionRpt with ExecType <150> ='Cancelled'.
Note that this is the equivalent of an "UNSOLICITED UR OUT" CMS message.
The equivalent of a "NOTHING DONE" CMS message should be sent as a "status report", i.e. an
ExecutionRpt message with ExecTransType <20> ='Status' and ExecType <150> /OrdStatus <39> that of the previous
ExecutionRpt <8> message for this order (usually 'New' or 'Replaced' when "nothing has been done").
1. Filled order:
Time |
Message Received (ClOrdID, OrigClOrdID) |
Message Sent (ClOrdID, OrigClOrdID) |
ExecType |
OrdStatus |
Comment |
1 |
New Order(X) |
|
|
Pending New* |
38=10000 |
2 |
|
Execution(X) |
Rejected |
Rejected |
(if rejected) 38=10000, 151=0 |
2 |
|
Execution(X) |
New |
New |
38=10000, 151=10000 |
3 |
|
Execution(X) |
Partial Fill |
Partially Filled |
(may repeat for multiple partials) 38=10000, 151=<tag38-tag14) |
4 |
|
Execution(X) |
Fill |
Filled |
38=10000, 151=0, 14=10000 |
|
2. Partially Filled Order:
Time |
Message Received (ClOrdID, OrigClOrdID) |
Message Sent (ClOrdID, OrigClOrdID) |
ExecType |
OrdStatus |
Comment |
1 |
New Order(X) |
|
|
Pending New* |
38=10000 |
2 |
|
Execution(X) |
Rejected |
Rejected |
(if rejected) 38=10000, 151=0 |
2 |
|
Execution(X) |
New |
New |
38=10000, 151=10000 |
3 |
|
Execution(X) |
Partial Fill |
Partially Filled |
(may be multiple) 38=10000, 151=<tag38-tag14) |
4 |
|
Execution(X) |
Done for Day |
Done for Day |
38=10000, 151=0(depending on lifetime of order) |
|
3. Canceled Order:
Time |
Message Received (ClOrdID, OrigClOrdID) |
Message Sent (ClOrdID, OrigClOrdID) |
ExecType |
OrdStatus |
Comment |
1 |
New Order(X) |
|
|
Pending New* |
38=10000 |
2 |
|
Execution(X) |
Rejected |
Rejected |
(if rejected) 38=10000, 151=0 |
2 |
|
Execution(X) |
New |
New |
38=10000, 151=10000 |
3 |
Cancel Request(Y,X) |
|
|
Pending Cancel |
38=10000 |
4 |
|
Cancel Reject(Y,X) |
N/A |
New |
(if rejected by salesperson) |
4 |
|
Execution(Y,X) |
Pending Cancel |
Pending Cancel |
38=10000, 151=10000 |
5 |
|
Cancel Reject(Y,X) |
N/A |
New |
(if rejected by trader/exchange) |
5 |
|
Execution(Y,X) |
Canceled |
Canceled |
38=10000, 151=0 |
|
* information only transmitted as the result of an Order Status Request on this order
4. Partially Filled Order followed by Replace Request to Decrease Order Quantity:
Time |
Message Received (ClOrdID, OrigClOrdID) |
Message Sent (ClOrdID, OrigClOrdID) |
ExecType |
OrdStatus |
Comment |
1 |
New Order(X) |
|
|
Pending New* |
38=10000 |
2 |
|
Execution(X) |
Rejected |
Rejected |
(if rejected) 38=10000, 151=0 |
2 |
|
Execution(X) |
New |
New |
38=10000, 151=10000 |
3 |
|
Execution(X) |
Partial Fill |
Partially Filled |
38=10000, 32=1000, 14=1000, 151=9000 |
4 |
Replace Request(Y,X) |
|
|
Pending Cancel* |
(decreasing order quantity to 8000 leaving 7000 open) 38=8000 |
5 |
|
Cancel Reject(Y,X) |
N/A |
Partially Filled |
(if rejected by sales person) |
5 |
|
Execution(Y,X) |
Pending Cancel |
Pending Cancel |
38=10000, 14=1000, 151=9000 |
6 |
|
Execution(X) |
Partial Fill |
Pending Cancel |
38=10000, 32=500, 14=1500, 151=8500 |
7 |
|
Cancel Reject(Y,X) |
N/A |
Partially Filled |
(if rejected by trader/exchange) |
7 |
|
Execution(Y,X) |
Replace |
Partially Filled |
38=8000, 14=1500, 151=6500 |
8 |
|
Execution(Y,X) |
Fill |
Filled |
38=8000, 14=8000, 151=0 |
|
* information only transmitted as the result of an Order Status Request on this order
5. Replaced Order:
Time |
Message Received (ClOrdID, OrigClOrdID) |
Message Sent (ClOrdID, OrigClOrdID) |
ExecType |
OrdStatus |
Comment |
1 |
New Order(X) |
|
|
Pending New* |
38=10000 |
2 |
|
Execution(X) |
Rejected |
Rejected |
(if rejected) 38=10000, 151=0 |
2 |
|
Execution(X) |
New |
New |
38=10000, 151=10000 |
3 |
Replace Request(Y,X) |
|
|
Pending Cancel* |
(changing price only) 38=10000 |
4 |
|
Cancel Reject(Y,X) |
N/A |
New |
(if rejected by sales person) |
4 |
|
Execution(Y,X) |
Pending Cancel |
Pending Cancel |
38=10000, 151=10000 |
5 |
|
Cancel Reject(Y,X) |
N/A |
New |
(if rejected by trader/exchange) |
5 |
|
Execution(Y,X) |
Replace |
Replaced |
38=10000, 151=10000 |
|
* information only transmitted as the result of an Order Status Request on this order
6. Filled Order followed by a CancelReject:
Time |
Message Received (ClOrdID, OrigClOrdID) |
Message Sent (ClOrdID, OrigClOrdID) |
ExecType |
OrdStatus |
Comment |
1 |
New Order(X) |
|
|
Pending New* |
38=10000 |
2 |
|
Execution(X) |
Rejected |
Rejected |
(if rejected) 38=10000, 151=0 |
2 |
|
Execution(X) |
New |
New |
38=10000, 151=10000 |
3 |
|
Execution(X) |
Partial Fill |
Partially Filled |
(may repeat for multiple partials) 38=10000, 151=<tag38-tag14) |
4 |
Replace Request(Y,X) |
|
|
Partially Filled* |
(replace request and filled message "pass" each other on the connection) 38=10000 |
4 |
|
Execution(X) |
Fill |
Filled |
38=10000, 32=10000, 14=10000, 151=0 |
5 |
|
Cancel Reject(Y,X) |
|
Filled |
|
|
7. Partially Filled Order followed by a Cancel Request:
Time |
Message Received (ClOrdID, OrigClOrdID) |
Message Sent (ClOrdID, OrigClOrdID) |
ExecType |
OrdStatus |
Comment |
1 |
New Order(X) |
|
|
Pending New* |
38=10000 |
2 |
|
Execution(X) |
Rejected |
Rejected |
(if rejected) 38=10000, 151=0 |
2 |
|
Execution(X) |
New |
New |
38=10000, 151=10000 |
3 |
|
Execution(X) |
Partial Fill |
Partially Filled |
38=10000, 151=<tag38-tag14) |
4 |
Cancel Request(Y,X) |
|
|
Pending Cancel |
38=10000 |
5 |
|
Cancel Reject(Y,X) |
N/A |
Partially Filled |
(if rejected) |
5 |
|
Execution(Y,X) |
Pending Cancel |
Pending Cancel |
38=10000, 151=<tag38-tag14) |
6 |
|
Execution(X) |
Partial Fill |
Pending Cancel |
38=10000, 151=<tag38-tag14) |
7 |
|
Cancel Reject(Y,X) |
N/A |
Partially Filled |
(if rejected) |
7 |
|
Execution(Y,X) |
Canceled |
Canceled |
38=10000, 151=0 |
|
8. Partially Filled Order followed by Replace Request to Increase Quantity:
Time |
Message Received (ClOrdID, OrigClOrdID) |
Message Sent (ClOrdID, OrigClOrdID) |
ExecType |
OrdStatus |
Comment |
1 |
New Order(X) |
|
|
Pending New* |
38=10000 |
2 |
|
Execution(X) |
Rejected |
Rejected |
(if rejected) 38=10000, 151=0 |
2 |
|
Execution(X) |
New |
New |
38=10000, 151=10000 |
3 |
|
Execution(X) |
Partial Fill |
Partially Filled |
38=10000, 151=<tag38-tag14) |
4 |
Replace Request(Y,X) |
|
|
Pending Cancel* |
(increasing quantity) 38=12000 |
5 |
|
Cancel Reject(Y,X) |
N/A |
Partially Filled |
(if rejected) |
5 |
|
Execution(Y,X) |
Pending Cancel |
Pending Cancel |
38=10000, 151=<tag38-tag14) |
6 |
|
Execution(X) |
Partial Fill |
Pending Cancel |
38=10000, 151=<tag38-tag14) |
7 |
|
Cancel Reject(Y,X) |
N/A |
Partially Filled |
(if rejected) |
7 |
|
Execution(Y,X) |
Replace |
Partially Filled |
38=12000, 151=<tag38-tag14) |
|
9. Filled Order followed by Replace Request to Increase Quantity:
Time |
Message Received (ClOrdID, OrigClOrdID) |
Message Sent (ClOrdID, OrigClOrdID) |
ExecType |
OrdStatus |
Comment |
1 |
New Order(X) |
|
|
Pending New* |
38=10000 |
2 |
|
Execution(X) |
Rejected |
Rejected |
(if rejected) 38=10000, 151=0 |
2 |
|
Execution(X) |
New |
New |
38=10000, 151=10000 |
3 |
|
Execution(X) |
Fill |
Filled |
38=10000, 14=10000, 151=0 |
4 |
Replace Request(Y,X) |
|
|
Pending Cancel* |
(increasing quantity) 38=12000 |
5 |
|
Cancel Reject(Y,X) |
N/A |
Filled |
(if rejected) |
5 |
|
Execution(Y,X) |
Pending Cancel |
Pending Cancel |
38=10000, 151=<tag38-tag14) |
7 |
|
Cancel Reject(Y,X) |
N/A |
Filled |
(if rejected) |
7 |
|
Execution(Y,X) |
Replace |
Partially Filled |
38=12000, 151=<tag38-tag14) |
|
10. Rejected Order due to Duplicate ClOrdID:
Time |
Message Received (ClOrdID, OrigClOrdID) |
Message Sent (ClOrdID, OrigClOrdID) |
ExecType |
OrdStatus |
Comment |
1 |
New Order(X) |
|
|
Pending New* |
38=10000 |
2 |
|
Execution(X) |
New |
New |
38=10000, 151=10000 |
3 |
|
Execution(X) |
Partial Fill |
Partially Filled |
38=10000, 151=<tag38-tag14) |
4 |
New Order(X) |
|
|
Partially Filled* |
38=10000 |
5 |
|
Execution(X) |
Rejected |
Partially Filled |
OrdRejReason<103>= duplicate ClOrdID<11>) 38=10000, 151=<tag38-tag14> |
|
|