Trading Messages

Messaging Sequence

sequenceDiagram participant Client as Client FIX Engine participant ACY as ACY Connect Client->>ACY: NewOrderSingle (35=D) Submit new order ACY->>Client: ExecutionReport (35=8),OrdStatus<39> = A (Pending New) Pending Order received ACY->>Client: ExecutionReport (35=8),OrdStatus<39> = 1 (Partially Filled) Partial fill notification ACY->>Client: ExecutionReport (35=8),OrdStatus<39> = 2 (Fill) Order fully filled alt Cancel Order Client->>ACY: OrderCancelRequest (35=F) Cancel pending order request ACY->>Client: ExecutionReport (35=8), OrdStatus<39> = 4 (Canceled) Order cancelled confirmation else Cancel Reject ACY->>Client: OrderCancelReject (35=9) Cancel request rejected end

Order Flow Sequence:

  • Client Sends NewOrderSingle Message to Zerologix
  • Zerologix responds with ExecutionReport which ExecType = "Pending New" (A)
  • Zerologix responds with 0..n ExecutionReport which OrderStatus = "Partially Filled" (1), and ExecType = "Trade" (F)
  • Zerologix responds with an ExecutionReport with OrderStatus = "Filled" (2) and ExecType = "Trade" (F)
  • or with an ExecutionReport ExecType = "Canceled" (4)
  • or with an ExecutionReport ExecType = "Rejected" (8)

NewOrderSingle (35=D)

The new order message type is used by institutions wishing to electronically submit securities and forex orders to a broker for execution.

Tag Field Name Required Type Comments
<Standard Header> Y - MsgType <35> = 0
1 Account N String Should be the same as trading account number, can be omitted.
11 ClOrdID Y String Unique identifier of the order as assigned by institution or by the intermediary (CIV term, not a hub/service bureau) with closest association with the investor.
55 Symbol Y String Instrument symbol (for FX, use CCY1CCY2 format)
54 Side Y Int The side (buy or sell) of the request. 1 = Buy, 2 = Sell
38 OrderQty Y Qty Order amount (for FX orders, this is the CCY1 amount)
40 OrdType Y Char Enumeration for the Type of Order. 1 = Market, 2 = Limit, 3 = Stop
44 Price Y/N Price Conditionally required based on OrdType and Environment
OrdType<40>=1 (Market)
OrdType<40>=2 (Limit) : Required and set to the limit price
99 StopPx Y/N Price Required for OrdType <40> = 3 (Stop)
58 Text N String User comment field.
59 TimeInForce Y Int Enumeration of order duration. Must be 1 = Good Till Cancel (GTC)
60 TransactTime Y Time Time of order creation in UTC format.

ExecutionReport (35=8)

The execution report message is used to:

  • Confirm the receipt of an order
  • Confirm changes to an existing order (i.e. accept cancel and replace requests)
  • Relay order status information
  • Relay fill information on working orders
  • Relay fill information on tradeable or restricted tradeable quotes
  • Reject orders
  • Report post-trade fees calculations associated with a trade

Each Execution Report (8) contains two fields which are used to communicate both the current state of the order as understood by the broker (OrdStatus (39)) and the purpose of the message (ExecType (150)).

In an Execution Report (8) the OrdStatus (39) is used to convey the current state of the order. If an order simultaneously exists in more than one order state, the value with highest precedence is the value that is reported in the OrdStatus (39) field. The order statuses are as follows (in highest to lowest precedence):

Precedence OrdStatus (39) Description
11 Pending Cancel Order with an Order Cancel Request pending, used to confirm receipt of an Order Cancel Request (F). DOES NOT INDICATE THAT THE ORDER HAS BEEN CANCELED.
10 Pending Replace Order with an Order Cancel/Replace Request pending, used to confirm receipt of an Order Cancel/Replace Request (G). DOES NOT INDICATE THAT THE ORDER HAS BEEN REPLACED.
9 Done for Day Order not, or partially, filled; no further executions forthcoming for the trading day
8 Calculated Order has been completed for the day (either filled or done for day). Commission or currency settlement details have been calculated and reported in this execution message
7 Filled Order completely filled, no remaining quantity
6 Stopped Order has been stopped at the exchange. Used when guaranteeing or protecting a price and quantity
5 Suspended Order has been placed in suspended state at the request of the client.
4 Canceled Canceled order with or without executions
4 Expired Order has been canceled in broker's system due to time in force instructions.
3 Partially Filled Outstanding order with executions and remaining quantity
2 New Outstanding order with no executions
2 Rejected Order has been rejected by sell-side (broker, exchange, ECN). NOTE: An order can be rejected subsequent to order acknowledgment, i.e. an order can pass from New to Rejected status.
2 Pending New Order has been received by sell-side's (broker, exchange, ECN) system but not yet accepted for execution. An Execution Report (8) message with this status will only be sent in response to a Status Request (H) message.
1 Accepted for bidding Order has been received and is being evaluated for pricing. It is anticipated that this status will only be used with the "Disclosed" BidType (394) List Order Trading model.
Tag Field Name Required Type Comments
<Standard Header> Y - MsgType <35> = 8
1 Account N String It refers to the trading account number.
11 ClOrdID Y String The Unique ID sent by the client in Tag 11 of the corresponding NewOrderSingle message.
37 OrderID Y String A Unique Order ID assigned to the original order by the FIX Engine.
17 ExecID Y String A unique ID assigned to the specific Execution Report by Zerologix or ACY Connect. These ExecIDs are only guaranteed to be unique within a single session, and only for the duration of that session's connection. IDs may repeat after a session reconnects, and IDs are not guaranteed to be unique across multiple simultaneously connected sessions.
39 OrdStatus Y Int Describes the current state of the order corresponding to this execution report. A=Pending New (Received), 1=Partially Filled (Open, with some fills but is not completely filled), 2=Fill (Completely Filled), 4=Canceled (Cancelled, can have fills but is not a complete fill.), 8=Rejected (Rejected, no fills)
150 ExecType Y Int The enumerated type of this ExecutionReport: A=Pending New (Received), 4=Canceled (Cancelled, can have fills but is not a complete fill.), 8=Rejected (Rejected, no fills), F = Trade (this report indicates a full or notification of partial fillled volume)
55 Symbol Y String The instrument symbol from the original order request.
54 Side Y Int The side (by or sell) of the original request. 1 = Buy, 2 = Sell
38 OrderQty Y Qty Original order quantity. Does not indicate the amount this order has been filled
40 OrdType Y Int Enumerated Order Type from the original request. For reference. 1 = Market, 2 = Limit, D = Previously Quoted
44 Price N Price The original requested Limit order or Market order price for the order.
99 StopPx N Price The original requested Stop order price for the order.
59 TimeInForce Y Int Enumeration of order duration for the original request. 1 = Good Till Cancel (GTC), 3 = Immediate Or Cancel (IOC), 4 = Fill Or Kill (FOK)
126 ExpireTime N Date Time of the expire time in UTC Format. Optional for limit and stop order
31 LastPx C Price If ExecType(150) is Trade, this field will be required and will represent the price of this(last) fill.
32 LastQty N Qty If ExecType is Trade, this will be set to the quantity bought or sold.
151 LeavesQty Y Qty The remaining quantity open for further execution. If OrdStatus (39) is Canceled, Expired, or Rejected (in which case the order is no longer active) then LeavesQty (151) could be 0, otherwise LeavesQty (151) = OrderQty (38) - CumQty (14).
14 CumQty Y Qty The total quantity filled for original request, including this fill.
6 AvgPx Y Price The Average Price of all fills for this request, including this fill. This will be 0 if ExecType is Pending New.
64 SettlDate N Date If ExecType is Trade, this will be set to the UTC Settlement Date for the fill in YYYYMMDD format.
75 TradeDate N Date If ExecType is Trade, this will be set to the UTC Trade Date for the fill in YYYYMMDD format.
103 OrdRejReason N Int If ExecType (150) = 8 (Rejected), this field indicates the reason why the order was rejected
58 Text N String If ExecType is Rejected or Canceled, and the reason is known, will be set to a text explanation of the reason.
60 TransactTime N Date Time of the original order creation in UTC Format. Not sent when ExecType is Pending New

Order Cancel Request (35=F)

The order cancel request message requests the cancellation of all of the remaining quantity of an existing order.

Tag Field Name Required Type Comments
<Standard Header> Y - MsgType <35> = F
41 OrigClOrdID Y String The ClOrdID <11> of the original non-rejected order which client wishes to cancel.
11 ClOrdID Y String Unique ID of cancel request assigned by zerologix
54 Side Y Int The side of the request. 1 = Buy, 2 = Sell
60 TransactTime Y Date Time this order request was initiated/released by the trader or trading system.

Order Cancel Reject (35=9)

Tag Field Name Required Type Comments
<Standard Header> Y - MsgType <35> = 9
37 OrderID Y String A Unique Order ID assigned to the original accepted order by the FIX Engine. Will be 'NONE' if CxlRejReason(102)="Unknown order" (1)
41 OrigClOrdID Y String The ClOrdID from the original order the client wishes to cancel
11 ClOrdID Y String The unique ID to identify the originating cancel request.
39 OrdStatus Y Int Enumeration indicating the status of the order that was attempted canceled.
102 CxlRejReason Y Int Enumeration indicating the reason why the cancel was rejected.
0 = Too Late To Cancel – Order has already been canceled or filled.
1 = Unknown Order – Order ID does not exist in FIX engine, which means either this Order ID is invalid or the order has already been fully filled.
3 = Order Already in Pending Cancel or Pending Replace Status – Order ID exists, which means this order is in Pending new status or partially filled.
434 CxlRejResponseTo Y Int Enumeration indicating the type of request this reject is in response to.
60 TransactTime Y Date The time the last action on the order was transacted.