FIX API / FIX 5.0/Order Execution
Order Execution
Submit and manage orders through the FIX 5.0 protocol.
Order Execution in FIX 5.0
Order execution messages in FIX 5.0 are functionally identical to FIX 4.4. All messages use BeginString=FIXT.1.1 as the transport layer. The same order types, fields, and execution reports apply.
Orders are submitted on the Trade Session (default port 5012).
NewOrderSingle (MsgType = D)
Submit a new order.
| Tag | Field | Required | Description |
|---|---|---|---|
| 8 | BeginString | Yes | FIXT.1.1 |
| 35 | MsgType | Yes | D |
| 11 | ClOrdID | Yes | Unique client order ID |
| 55 | Symbol | Yes | Instrument (e.g. EURUSD) |
| 54 | Side | Yes | 1 = Buy, 2 = Sell |
| 38 | OrderQty | Yes | Quantity (e.g. 100000 for 1 standard lot) |
| 40 | OrdType | Yes | 1 = Market, 2 = Limit, 3 = Stop |
| 44 | Price | Conditional | Required for Limit orders |
| 99 | StopPx | Conditional | Required for Stop orders |
| 59 | TimeInForce | No | 1 = GTC, 3 = IOC, 4 = FOK (default: GTC) |
| 60 | TransactTime | Yes | Client transaction timestamp |
Market Order Example
8=FIXT.1.1|9=150|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=179|
Limit Order Example
8=FIXT.1.1|9=164|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=194|
Stop Order Example
8=FIXT.1.1|9=164|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=206|
ExecutionReport (MsgType = 8)
Server response for order status, fills, and rejections. All fields identical to FIX 4.4.
| Tag | Field | Description |
|---|---|---|
| 8 | BeginString | FIXT.1.1 |
| 35 | MsgType | 8 |
| 37 | OrderID | Server-assigned order ID |
| 11 | ClOrdID | Client order ID |
| 17 | ExecID | Unique execution identifier |
| 150 | ExecType | Execution type |
| 39 | OrdStatus | Current order status |
| 55 | Symbol | Instrument |
| 54 | Side | 1 = Buy, 2 = Sell |
| 44 | Price | Order price |
| 38 | OrderQty | Ordered quantity |
| 32 | LastQty | Quantity filled in this execution |
| 31 | LastPx | Price of this fill |
| 14 | CumQty | Total quantity filled |
| 151 | LeavesQty | Remaining quantity |
| 6 | AvgPx | Average fill price |
| 60 | TransactTime | Timestamp |
ExecType Values (Tag 150)
| Value | Meaning |
|---|---|
0 | New — Order accepted |
4 | Canceled — Order canceled |
5 | Replaced — Order modified |
8 | Rejected — Order rejected |
F | Trade — Partial or full fill |
C | Expired — Order expired |
OrdStatus Values (Tag 39)
| Value | Meaning |
|---|---|
0 | New |
1 | Partially Filled |
2 | Filled |
4 | Canceled |
6 | Pending Cancel |
8 | Rejected |
C | Expired |
E | Pending Replace |
Example — Order Filled
8=FIXT.1.1|9=214|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=209|
OrderCancelRequest (MsgType = F)
Cancel a pending order. Identical to FIX 4.4.
| Tag | Field | Required | Description |
|---|---|---|---|
| 8 | BeginString | Yes | FIXT.1.1 |
| 35 | MsgType | Yes | F |
| 41 | OrigClOrdID | Yes | Original ClOrdID to cancel |
| 11 | ClOrdID | Yes | New unique ID for this cancel request |
| 55 | Symbol | Yes | Instrument |
| 54 | Side | Yes | 1 = Buy, 2 = Sell |
| 60 | TransactTime | Yes | Timestamp |
OrderCancelReplaceRequest (MsgType = G)
Modify a pending order. Identical to FIX 4.4.
| Tag | Field | Required | Description |
|---|---|---|---|
| 8 | BeginString | Yes | FIXT.1.1 |
| 35 | MsgType | Yes | G |
| 41 | OrigClOrdID | Yes | Original ClOrdID |
| 11 | ClOrdID | Yes | New unique ID |
| 55 | Symbol | Yes | Instrument |
| 54 | Side | Yes | Side (must match original) |
| 40 | OrdType | Yes | Order type |
| 44 | Price | Conditional | New price (Limit orders) |
| 99 | StopPx | Conditional | New stop price (Stop orders) |
| 38 | OrderQty | Yes | New quantity |
| 60 | TransactTime | Yes | Timestamp |
OrderCancelReject (MsgType = 9)
Sent when a cancel or replace request cannot be processed. Same fields and reason codes as FIX 4.4.
| Tag | Field | Description |
|---|---|---|
| 35 | MsgType | 9 |
| 37 | OrderID | Server order ID |
| 11 | ClOrdID | ClOrdID of the cancel/replace request |
| 41 | OrigClOrdID | Original ClOrdID |
| 39 | OrdStatus | Current order status |
| 434 | CxlRejResponseTo | 1 = Cancel, 2 = Replace |
| 102 | CxlRejReason | 0 = Too late, 1 = Unknown order, 99 = Other |
| 58 | Text | Human-readable reason |
Order Types & TimeInForce
Same as FIX 4.4:
| OrdType (Tag 40) | Name | Behavior |
|---|---|---|
1 | Market | Executes at best available price |
2 | Limit | Executes at specified price or better |
3 | Stop | Triggers market order at stop price |
| TimeInForce (Tag 59) | Name | Behavior |
|---|---|---|
1 | GTC | Active until filled or canceled |
3 | IOC | Fill available, cancel rest |
4 | FOK | Fill entirely or reject |
6 | GTD | Active until specified date |
Differences from FIX 4.4 Order Execution
| Aspect | FIX 4.4 | FIX 5.0 |
|---|---|---|
| BeginString (Tag 8) | FIX.4.4 | FIXT.1.1 |
| Default port (Trade) | 5002 | 5012 |
| Application version | Implicit | Set via Tag 1137 during Logon |
| Per-message version | Not supported | Override with Tag 1128 |
| Order tags & semantics | ✓ | Identical |
| ExecutionReport fields | ✓ | Identical |
Best Practices
- Use unique ClOrdIDs — Every order, cancel, and replace must have a unique ClOrdID
- Track order state — Maintain a local order book updated by ExecutionReports
- Handle partial fills — Monitor
CumQtyandLeavesQty - Check ExecType before OrdStatus — ExecType = what happened; OrdStatus = resulting state
- Use IOC for market orders — Prevents orders lingering on the book
Next Steps
- Overview — Back to the FIX 5.0 overview
- Session Management — FIXT 1.1 logon and session handling
- Market Data — Subscribe to streaming quotes