Brokeret LogoDocs
FIX API / FIX 4.4/Order Execution

Order Execution

Submit and manage orders through the FIX 4.4 protocol.

Order Execution Overview

Orders are submitted and managed on the Trade Session (default port 5002). All order-related messages use this dedicated session while market data flows on the separate Price Session.

NewOrderSingle (MsgType = D)

Submit a new order.

TagFieldRequiredDescription
35MsgTypeYesD
11ClOrdIDYesUnique client order ID
55SymbolYesInstrument (e.g. EURUSD)
54SideYes1 = Buy, 2 = Sell
38OrderQtyYesQuantity (in lots, e.g. 100000 for 1 standard lot)
40OrdTypeYes1 = Market, 2 = Limit, 3 = Stop
44PriceConditionalRequired for Limit orders
99StopPxConditionalRequired for Stop orders
59TimeInForceNo1 = GTC, 3 = IOC, 4 = FOK (default: GTC)
60TransactTimeYesClient transaction timestamp

Market Order Example

8=FIX.4.4|9=148|35=D|49=CLIENT1|56=BROKERET|34=5|52=20260312-14:32:00.000|11=ORD001|55=EURUSD|54=1|38=100000|40=1|59=3|60=20260312-14:32:00.000|10=165|

Limit Order Example

8=FIX.4.4|9=162|35=D|49=CLIENT1|56=BROKERET|34=6|52=20260312-14:33:00.000|11=ORD002|55=GBPUSD|54=2|38=50000|40=2|44=1.26500|59=1|60=20260312-14:33:00.000|10=180|

Stop Order Example

8=FIX.4.4|9=162|35=D|49=CLIENT1|56=BROKERET|34=7|52=20260312-14:34:00.000|11=ORD003|55=USDJPY|54=1|38=200000|40=3|99=149.500|59=1|60=20260312-14:34:00.000|10=192|

ExecutionReport (MsgType = 8)

Sent by the server to communicate order status changes, fills, and rejections.

TagFieldDescription
35MsgType8
37OrderIDServer-assigned order ID
11ClOrdIDClient order ID from the request
17ExecIDUnique execution identifier
150ExecTypeExecution type (see table below)
39OrdStatusCurrent order status (see table below)
55SymbolInstrument
54Side1 = Buy, 2 = Sell
44PriceOrder price
38OrderQtyOrdered quantity
32LastQtyQuantity filled in this execution
31LastPxPrice of this fill
14CumQtyTotal quantity filled so far
151LeavesQtyRemaining quantity
6AvgPxAverage fill price
60TransactTimeTimestamp of the execution

ExecType Values (Tag 150)

ValueMeaning
0New — Order accepted
4Canceled — Order canceled
5Replaced — Order modified
8Rejected — Order rejected
FTrade — Partial or full fill
CExpired — Order expired

OrdStatus Values (Tag 39)

ValueMeaning
0New
1Partially Filled
2Filled
4Canceled
6Pending Cancel
8Rejected
CExpired
EPending Replace

Example — Order Acknowledged

8=FIX.4.4|9=196|35=8|49=BROKERET|56=CLIENT1|34=6|52=20260312-14:32:00.100|37=SVR001|11=ORD001|17=EXEC001|150=0|39=0|55=EURUSD|54=1|44=1.08455|38=100000|32=0|31=0|14=0|151=100000|6=0|60=20260312-14:32:00.100|10=178|

Example — Order Filled

8=FIX.4.4|9=212|35=8|49=BROKERET|56=CLIENT1|34=7|52=20260312-14:32:00.200|37=SVR001|11=ORD001|17=EXEC002|150=F|39=2|55=EURUSD|54=1|44=1.08455|38=100000|32=100000|31=1.08455|14=100000|151=0|6=1.08455|60=20260312-14:32:00.200|10=195|

Example — Order Rejected

8=FIX.4.4|9=176|35=8|49=BROKERET|56=CLIENT1|34=8|52=20260312-14:32:00.300|37=NONE|11=ORD004|17=EXEC003|150=8|39=8|55=EURUSD|54=1|38=100000|103=1|58=Insufficient margin|60=20260312-14:32:00.300|10=210|

OrdRejReason Codes (Tag 103)

CodeMeaning
0Broker option
1Unknown symbol
2Exchange closed
3Order exceeds limit
5Unknown order
6Duplicate order
13Incorrect quantity
99Other

OrderCancelRequest (MsgType = F)

Cancel a pending or working order.

TagFieldRequiredDescription
35MsgTypeYesF
41OrigClOrdIDYesOriginal ClOrdID of the order to cancel
11ClOrdIDYesNew unique ID for this cancel request
55SymbolYesInstrument
54SideYes1 = Buy, 2 = Sell
60TransactTimeYesTimestamp

Example

8=FIX.4.4|9=138|35=F|49=CLIENT1|56=BROKERET|34=8|52=20260312-14:40:00.000|41=ORD002|11=CXL001|55=GBPUSD|54=2|60=20260312-14:40:00.000|10=155|

The server responds with an ExecutionReport (ExecType=4, OrdStatus=4) on success, or an OrderCancelReject on failure.

OrderCancelReplaceRequest (MsgType = G)

Modify a pending order's price, quantity, or other parameters.

TagFieldRequiredDescription
35MsgTypeYesG
41OrigClOrdIDYesOriginal ClOrdID
11ClOrdIDYesNew unique ID for this request
55SymbolYesInstrument
54SideYesSide (must match original)
40OrdTypeYesOrder type
44PriceConditionalNew price (for Limit orders)
99StopPxConditionalNew stop price (for Stop orders)
38OrderQtyYesNew quantity
60TransactTimeYesTimestamp

Example — Modify Limit Price

8=FIX.4.4|9=168|35=G|49=CLIENT1|56=BROKERET|34=9|52=20260312-14:41:00.000|41=ORD002|11=MOD001|55=GBPUSD|54=2|40=2|44=1.26600|38=50000|60=20260312-14:41:00.000|10=172|

OrderCancelReject (MsgType = 9)

Sent when a cancel or replace request cannot be processed.

TagFieldDescription
35MsgType9
37OrderIDServer order ID
11ClOrdIDClOrdID of the cancel/replace request
41OrigClOrdIDOriginal ClOrdID
39OrdStatusCurrent order status
434CxlRejResponseTo1 = Cancel, 2 = Replace
102CxlRejReason0 = Too late, 1 = Unknown order, 99 = Other
58TextHuman-readable reason

BusinessMessageReject (MsgType = j)

Application-level rejection for unsupported or invalid business messages.

TagFieldDescription
35MsgTypej
45RefSeqNumSequence number of the rejected message
372RefMsgTypeMsgType of the rejected message
380BusinessRejectReasonRejection reason code
58TextHuman-readable description

BusinessRejectReason Codes (Tag 380)

CodeMeaning
0Other
1Unknown ID
3Unsupported message type
4Application not available
5Conditionally required field missing
6Not authorized

Order Types Summary

OrdType (Tag 40)NameBehavior
1MarketExecutes immediately at best available price
2LimitExecutes at specified price or better
3StopTriggers a market order when stop price is reached

TimeInForce Options

Value (Tag 59)NameBehavior
1GTC (Good Till Cancel)Remains active until filled or canceled
3IOC (Immediate or Cancel)Fill what's available, cancel the rest
4FOK (Fill or Kill)Fill entirely or reject
6GTD (Good Till Date)Active until a specified date

Best Practices

  • Use unique ClOrdIDs — Every order, cancel, and replace must have a unique ClOrdID within the session
  • Track order state — Maintain a local order book updated by ExecutionReports
  • Handle partial fills — Monitor CumQty and LeavesQty for partially filled orders
  • Check ExecType before OrdStatus — ExecType tells you what happened; OrdStatus tells you the resulting state
  • Implement timeout logic — If no ExecutionReport is received within a reasonable time, send an OrderStatusRequest
  • Use IOC for market orders — Prevents orders from sitting on the book if immediate execution isn't available

Next Steps