FIX Taker Specification
1. Introduction
1.1 Purpose
This document describes the FIX Taker API, a FIX 4.4-based channel that enables clients to consume foreign exchange market data from MEX Exchange and execute trades. The API provides real-time market data distribution and order execution capabilities through two dedicated FIX sessions.
1.2 Scope
This specification covers:
- Connectivity requirements and session management
- Supported FIX message types and workflows
- Market data subscription and book maintenance
- Order submission, amendment, cancellation, and execution reporting
- Error handling and recovery procedures
1.3 Document Conventions
- Required fields are marked with
Yin the Req column - Optional fields are marked with
Nin the Req column - Inbound messages (I) are sent to MEX Exchange (Client → MEX Exchange)
- Outbound messages (O) are sent from MEX Exchange (MEX Exchange → Client)
- Bidirectional messages (B) can be sent in either direction
All timestamps are in UTC. Developers should validate incoming messages, handle sequence gaps promptly on the Orders session, and use unique identifiers to avoid collisions.
2. Connectivity
2.1 Connection Architecture
The FIX Taker API operates with a dual-session architecture:
- Market Data Session: Distributes real-time market data including live price feeds and market depth. Messages are transient; the server does not resend market data on Resend Request.
- Orders Session: Handles order submission, execution, cancellation, replace, and trade reporting. Messages are persistent; the server resends order-related messages on client Resend Request.
The sessions are paired: market data requests are rejected while the Orders session is not logged in. All open orders are canceled on logout or disconnect.
2.2 Acceptor/Initiator Logic
Role Assignment:
- Client (Taker): Acts as the Initiator — initiates connection to MEX Exchange
- MEX Exchange: Acts as the Acceptor — accepts connections from the client
Connection Flow:
- Client initiates TCP connection to MEX Exchange
- MEX Exchange accepts the connection and waits for Logon message
- Client sends Logon message to establish FIX session
- MEX Exchange responds with Logon message
- Sessions become active for message exchange
Connect to each session separately using the same credentials but different SenderCompID indicators.
2.3 Supported Instruments
| Instrument Type | Description |
|---|---|
| SPOT | Immediate settlement FX transactions (standard T+2 settlement). |
| NDFs | Non-Deliverable Forwards — cash-settled FX derivatives for emerging markets. |
Notes: Instruments are specified via Symbol (e.g.
EUR/USD), SecurityType, and SettlType/SettlDate for tenors. Validate availability per your configuration.
3. FIX Protocol Information
3.1 Supported FIX Version
The FIX Taker API conforms to FIX 4.4 specifications as defined by the FIX Protocol Organization (http://www.fixprotocol.org).
3.2 Message Structure
All FIX messages consist of three components:
- Standard Header: Contains routing and identification fields (always first)
- Message Body: Contains message-specific fields
- Standard Trailer: Contains integrity check field (always last)
Messages are delimited by SOH (Start of Header, ASCII 01) characters.
3.3 Standard Header Fields
| Tag | Name | Req | Type | Notes |
|---|---|---|---|---|
| 8 | BeginString | Y | String | Always first field. Must be set to FIX.4.4 |
| 9 | BodyLength | Y | Int | Always second field. Message length in bytes. |
| 35 | MsgType | Y | String | Always third field. Type of message. |
| 34 | MsgSeqNum | Y | Int | Sequence number of the message. |
| 52 | SendingTime | Y | UTCTimeStamp | Always expressed in UTC: YYYYMMDD-HH:MM:SS.sss |
| 49 | SenderCompID | Y | String | CompID of the sender. |
| 56 | TargetCompID | Y | String | CompID of the recipient. |
Notes: Validate sequence numbers on receipt. SendingTime must be within acceptable skew (e.g. ±120 seconds) or risk rejection.
3.4 Standard Trailer Fields
| Tag | Name | Req | Type | Notes |
|---|---|---|---|---|
| 10 | CheckSum | Y | String | Three bytes, simple checksum. Always last in message. |
3.5 Session Management
3.5.1 Heartbeat Mechanism
- Purpose: Maintains session connectivity and detects communication failures
- Interval: Configurable, maximum 60 seconds
- Behavior: If no messages received within heartbeat interval, Test Request is sent
- Response: Heartbeat message must be sent in response to Test Request
3.5.2 Sequence Number Management
- Orders session: Gap detection and Resend Request recovery are supported
- Market data session: Resends are not supported — resubscribe to rebuild the book
- Sequence numbers may reset to 1 on logon when
ResetSeqNumFlag=Y
3.5.3 Test Request Handling
- Trigger: Sent when no messages received within heartbeat interval
- Response: Must be answered with Heartbeat containing TestReqID
- Timeout: Failure to respond may result in session termination
3.6 Message Length and Field Limitations
- Message Length: No maximum imposed on FIX message length
- String Fields: No length restrictions on undefined String fields (IDs, free text)
- Defined Fields: Limited to longest valid value as per FIX specification
- Character Encoding: UTF-8 encoding recommended for text fields
3.7 Supported Message Types
| MsgType | Message Name | Direction |
|---|---|---|
| A | Logon | Bidirectional (B) |
| 5 | Logout | Bidirectional (B) |
| 0 | Heartbeat | Bidirectional (B) |
| 1 | Test Request | Bidirectional (B) |
| 2 | Resend Request | Bidirectional (B) |
| 3 | Reject | Bidirectional (B) |
| 4 | Sequence Reset | Bidirectional (B) |
| j | Business Message Reject | Bidirectional (B) |
| x | Security List Request | Outbound (O) |
| y | Security List | Inbound (I) |
| V | Market Data Request | Outbound (O) |
| Y | Market Data Request Reject | Inbound (I) |
| X | Market Data Incremental Refresh | Inbound (I) |
| D | New Order Single | Outbound (O) |
| F | Order Cancel Request | Outbound (O) |
| G | Order Cancel Replace Request | Outbound (O) |
| H | Order Status Request | Outbound (O) |
| 8 | Execution Report | Inbound (I) |
| 9 | Order Cancel Reject | Inbound (I) |
Note: There is no Snapshot Full Refresh (
35=W). Market data is delivered as Incremental Refresh (35=X) only. Inbound/Outbound is from client perspective
4. Workflows
4.1 Session Establishment Workflow
Client MEX Exchange
| |
|--- Logon MsgType(35) = A (Market) --->|
|<-- Logon MsgType(35) = A (Market) ----|
| |
|--- Logon MsgType(35) = A (Orders) --->|
|<-- Logon MsgType(35) = A (Orders) ----|
| |
Steps:
- Client initiates TCP connection to MEX Exchange
- MEX Exchange accepts connection
- Client sends Logon with credentials and session parameters
- MEX Exchange validates credentials and responds with Logon acknowledgment
- Both sessions become active. Market data subscriptions proceed only while the Orders session remains logged in.
4.2 Market Data Session Workflow
4.2.1 Market Data Request Flow
Client MEX Exchange
| |
|--- Market Data Request (V) ---------->|
|<-- Incremental Update (X) ------------|
| (initial book as New entries) |
|<-- Incremental Update (X) ------------|
| |
Process:
- Ensure the Orders session is logged in.
- Client sends Market Data Request (
263=1) for one instrument. - MEX Exchange streams Incremental Refresh (
35=X). The initial book arrives asMDUpdateAction=0(New); subsequent changes arrive as New/Change/Delete. - To unsubscribe, send
SubscriptionRequestType=2.
Note: There is no separate Snapshot Full Refresh (
35=W). The server will not resend market data on Resend Request — resubscribe instead.
4.2.2 Market Data Request Rejection Flow
Client MEX Exchange
| |
|--- Market Data Request (V) ---------->|
|<-- Market Data Request Reject (Y) ----|
| |
Rejection Reasons:
- Orders session not connected
- Unknown / unsupported symbol
- Instrument or trading disabled
- Invalid parameters
4.2.3 Security List Flow
Client MEX Exchange
| |
|--- Security List Request (x) -------->|
|<-- Security List (y) -----------------|
| |
4.3 Order Session Workflow
4.3.1 Successful Order Execution Flow
Client MEX Exchange
| |
|--- New Order Single (D) ------------->|
|<-- Execution Report (8) --------------|
| (Ack / New) |
|<-- Execution Report (8) --------------|
| (Partial / Full Fill) |
| |
Process:
- Subscribe to market data for prices.
- Submit New Order Single (quantity in base currency only).
- Receive Execution Reports for acknowledgment, fills, and terminal states.
- Optionally amend via Cancel/Replace or cancel via Cancel Request (
OrigClOrdIDrequired). - Use Status Request (
OrderIDorOrigClOrdID) for reconciliation.
4.3.2 Order Rejection Flow
Client MEX Exchange
| |
|--- New Order Single (D) ------------->|
|<-- Execution Report (8) --------------|
| (OrdStatus = Rejected) |
| |
Rejection Reasons:
- Duplicate ClOrdID
- Unknown symbol
- Non-base Currency
- Invalid price / quantity
- Instrument or trading disabled
4.3.3 Cancel / Replace Flow
Client MEX Exchange
| |
|--- Order Cancel Replace (G) --------->|
|<-- Execution Report (8) --------------|
| (Pending Replace) |
|<-- Execution Report (8) --------------|
| (Replaced) |
| |
Unsuccessful cancel/replace returns Order Cancel Reject (35=9).
4.4 Session Termination Workflow
Client MEX Exchange
| |
|--- Logout (5) ----------------------->|
|<-- Logout (5) ------------------------|
| |
Notes: All open orders are canceled on logout or disconnect.
4.5 Error Recovery Workflows
4.5.1 Sequence Gap Recovery (Orders Session)
Client MEX Exchange
| |
|<-- Message (SeqNum = 5) --------------|
|<-- Message (SeqNum = 7) --------------|
|--- Resend Request (2) --------------->|
| (BeginSeqNo=6, EndSeqNo=6) |
|<-- Message (SeqNo = 6) ---------------|
| |
Market data sessions ignore resends — unsubscribe and resubscribe to realign.
4.5.2 Heartbeat and Test Request
Client MEX Exchange
| |
| (No messages received within HB |
| interval) |
|<-- Test Request (1) ------------------|
|--- Heartbeat (0) (with TestReqID) --->|
| |
5. FIX Messages
Note: Any FIX tags that are not required are at the client's discretion whether or not the tags are sent/received.
5.1 Session Management Messages
5.1.1 Logon (MsgType = A)
Purpose: Establishes FIX session between counterparties
Direction: Bidirectional
Sender: Initially sent by Client (Initiator), acknowledged by MEX Exchange (Acceptor)
| Tag | Name | Req | Type | Notes |
|---|---|---|---|---|
| — | Standard Header | — | — | MsgType<35> = A |
| 98 | EncryptMethod | Y | Int | Indicates method of encryption. Valid value = 0 |
| 108 | HeartBtInt | Y | Int | How often heartbeat is expected. Valid value = < 60 |
| 141 | ResetSeqNumFlag | N | Char | Forces reset of sequence numbers to 1. Valid values: Y or N. Typically Y. |
| 553 | Username | N | String | Required when the session is configured for username/password authentication. |
| 554 | Password | N | String | Required when the session is configured for username/password authentication. |
| — | Standard Trailer | — | — |
Example:
8=FIX.4.4|9=152|35=A|34=1|49=CLIENT1|56=MEXEXCHNG|52=20251007-14:30:15.123|98=0|108=30|141=Y|553=trader123|554=P@ssw0rd123|10=123|
5.1.2 Logout (MsgType = 5)
Purpose: Terminates FIX session gracefully
Direction: Bidirectional
Sender: Either party can initiate logout
| Tag | Name | Req | Type | Notes |
|---|---|---|---|---|
| — | Standard Header | — | — | MsgType<35> = 5 |
| 58 | Text | N | String | Reason for logout. |
| — | Standard Trailer | — | — |
Notes: Always logout before disconnecting. All orders will be canceled on disconnect.
Example:
8=FIX.4.4|9=102|35=5|34=200|49=CLIENT1|56=MEXEXCHNG|52=20251007-18:00:00.123|58=End of trading day|10=178|
5.1.3 Heartbeat (MsgType = 0)
Purpose: Maintains session connectivity
Direction: Bidirectional
Sender: Sent periodically or in response to Test Request
| Tag | Name | Req | Type | Notes |
|---|---|---|---|---|
| — | Standard Header | — | — | MsgType<35> = 0 |
| 112 | TestReqID | N | String | If responding to a Test Request, contains the value of TestReqID<112> from the associated Test Request. |
| — | Standard Trailer | — | — |
Example:
8=FIX.4.4|9=85|35=0|34=5|49=CLIENT1|56=MEXEXCHNG|52=20251007-14:31:00.456|10=089|
5.1.4 Test Request (MsgType = 1)
Purpose: Tests session connectivity when no messages received
Direction: Bidirectional
Sender: Either party when heartbeat interval exceeded
| Tag | Name | Req | Type | Notes |
|---|---|---|---|---|
| — | Standard Header | — | — | MsgType<35> = 1 |
| 112 | TestReqID | Y | String | Identifier for the test request. |
| — | Standard Trailer | — | — |
Example:
8=FIX.4.4|9=98|35=1|34=12|49=CLIENT1|56=MEXEXCHNG|52=20251007-14:35:00.123|112=TEST_20251007_143500|10=156|
5.1.5 Resend Request (MsgType = 2)
Purpose: Requests retransmission of missed messages (Orders session only)
Direction: Bidirectional
Sender: Party detecting a sequence gap
| Tag | Name | Req | Type | Notes |
|---|---|---|---|---|
| — | Standard Header | — | — | MsgType<35> = 2 |
| 7 | BeginSeqNo | Y | Int | First sequence number to resend. |
| 16 | EndSeqNo | Y | Int | Last sequence number to resend. |
| — | Standard Trailer | — | — |
Notes: Market data sessions ignore resends — request a fresh subscription instead.
Example:
8=FIX.4.4|9=82|35=2|34=15|49=CLIENT1|56=MEXEXCHNG|52=20251007-14:40:00.456|7=10|16=14|10=098|
5.1.6 Sequence Reset (MsgType = 4)
Purpose: Resets the expected inbound sequence number (typically during gap-fill / recovery on the Orders session)
Direction: Bidirectional
Sender: Party performing gap fill or sequence reset
| Tag | Name | Req | Type | Notes |
|---|---|---|---|---|
| — | Standard Header | — | — | MsgType<35> = 4 |
| 123 | GapFillFlag | N | Boolean | Y = Gap Fill message; sequence number field is valid. N or omitted = Sequence Reset. |
| 36 | NewSeqNo | Y | Int | New sequence number. |
| — | Standard Trailer | — | — |
Example:
8=FIX.4.4|9=95|35=4|34=16|49=MEXEXCHNG|56=CLIENT1|52=20251007-14:41:00.123|123=Y|36=15|10=112|
5.1.7 Reject (MsgType = 3)
Purpose: Indicates rejection of a received message due to session issues
Direction: Bidirectional
Sender: Party rejecting malformed or invalid message
| Tag | Name | Req | Type | Notes |
|---|---|---|---|---|
| — | Standard Header | — | — | MsgType<35> = 3 |
| 371 | RefTagID | N | Int | The FIX tag of the field which caused the reject. |
| 372 | RefMsgType | N | String | The MsgType of the message that caused the reject. |
| 373 | SessionRejectReason | N | Int | An enumerated reason for the reject. |
| 45 | RefSeqNum | Y | Int | The MsgSeqNum of the message that caused the reject. |
| 58 | Text | N | String | Explanation of the reject. |
| — | Standard Trailer | — | — |
Example:
8=FIX.4.4|9=145|35=3|34=18|49=MEXEXCHNG|56=CLIENT1|52=20251007-14:42:00.789|45=17|371=55|372=D|373=5|58=Required tag missing|10=201|
5.1.8 Business Message Reject (MsgType = j)
Purpose: Indicates application-level rejection of a received business message (e.g. unknown order on Status Request)
Direction: Outbound (MEX Exchange → Client)
Sender: MEX Exchange
| Tag | Name | Req | Type | Notes |
|---|---|---|---|---|
| — | Standard Header | — | — | MsgType<35> = j |
| 45 | RefSeqNum | N | Int | MsgSeqNum of the rejected message, when available. |
| 372 | RefMsgType | Y | String | The MsgType of the rejected message (e.g. H). |
| 380 | BusinessRejectReason | Y | Int | 0 = Other, 1 = Unknown ID |
| 58 | Text | N | String | Explanation of the reject. |
| — | Standard Trailer | — | — |
Example:
8=FIX.4.4|9=115|35=j|34=72|49=MEXEXCHNG|56=CLIENT1|52=20251007-15:24:00.456|372=H|380=1|58=Unknown order ID|10=189|
5.2 Market Data Messages
5.2.1 Security List Request (MsgType = x)
Purpose: Requests the list of active securities available to the entity
Direction: Inbound (Client → MEX Exchange)
Sender: Client
| Tag | Name | Req | Type | Notes |
|---|---|---|---|---|
| — | Standard Header | — | — | MsgType<35> = x |
| 320 | SecurityReqID | Y | String | Unique ID used to refer back to the request. |
| 559 | SecurityListRequestType | Y | Char | 0 = Symbol |
| 167 | SecurityType | Y | String | FXSPOT, FXNDF, ALL |
| — | Standard Trailer | — | — |
Notes: The current server implementation returns the entity's enabled instruments and does not filter by requested SecurityType. Prefer
167=ALL.
Example:
8=FIX.4.4|9=98|35=x|34=25|49=CLIENT1|56=MEXEXCHNG|52=20251007-14:45:00.123|320=SECREQ_001|559=0|167=ALL|10=234|
5.2.2 Security List (MsgType = y)
Purpose: Response to Security List Request
Direction: Outbound (MEX Exchange → Client)
Sender: MEX Exchange
| Tag | Name | Req | Type | Notes |
|---|---|---|---|---|
| — | Standard Header | — | — | MsgType<35> = y |
| 320 | SecurityReqID | Y | String | ID used to refer back to the request. |
| 560 | SecurityRequestResult | Y | Int | 0 = Valid request, 1 = Invalid request |
| 146 | NoRelatedSym | Y | Int | Number of securities in list. |
| > 55 | Symbol | Y | String | Currency pair. |
| > 167 | SecurityType | Y | String | Currently always FXSPOT in the response. |
| > 63 | SettlType | N | String | Currently always 2D in the response. |
| > 64 | SettlDate | Y | String | Settlement date YYYYMMDD. |
| > 541 | MaturityDate | N | String | NDF fixing date when applicable. |
| — | Standard Trailer | — | — |
Notes: The current implementation may not echo the client's SecurityReqID and currently advertises instruments as FXSPOT/
2D.
Example:
8=FIX.4.4|9=185|35=y|34=28|49=MEXEXCHNG|56=CLIENT1|52=20251007-14:47:01.123|320=SECLIST1|560=0|146=2|55=EUR/USD|167=FXSPOT|63=2D|64=20251107|55=GBP/USD|167=FXSPOT|63=2D|64=20251107|10=156|
5.2.3 Market Data Request (MsgType = V)
Purpose: Subscribes to or unsubscribes from market data for an instrument
Direction: Inbound (Client → MEX Exchange)
Sender: Client
| Tag | Name | Req | Type | Notes |
|---|---|---|---|---|
| — | Standard Header | — | — | MsgType<35> = V |
| 262 | MDReqID | Y | String | Unique per day. |
| 263 | SubscriptionRequestType | Y | Char | 0 = Snapshots, 1 = Snapshots + Incremental Updates, 2 = Disable Updates. Book is always delivered via Incremental Refresh. |
| 264 | MarketDepth | N | Int | Accepted but currently ignored. Full available depth is published. |
| 146 | NoRelatedSym | Y | Int | Number of symbols (valid value: 1). |
| > 55 | Symbol | Y | String | Ticker symbol. |
| > 167 | SecurityType | Y | String | FXSPOT, FXNDF |
| > 63 | SettlType | N | String | Tenor type. |
| > 64 | SettlDate | N | String | YYYYMMDD when specified. |
| > 541 | MaturityDate | N | String | Fixing date for NDFs. YYYYMMDD |
| — | Standard Trailer | — | — |
Notes: Send one Market Data Request per instrument. SecurityType/SettlType/SettlDate/MaturityDate are echoed on outbound Incremental Refresh when provided.
Example:
8=FIX.4.4|9=145|35=V|34=30|49=CLIENT1|56=MEXEXCHNG|52=20251007-14:50:00.123|262=MDREQ_001|263=1|264=0|146=1|55=EUR/USD|167=FXSPOT|10=198|
5.2.4 Market Data Request Reject (MsgType = Y)
Purpose: Rejects an invalid market data subscription request
Direction: Outbound (MEX Exchange → Client)
Sender: MEX Exchange
| Tag | Name | Req | Type | Notes |
|---|---|---|---|---|
| — | Standard Header | — | — | MsgType<35> = Y |
| 262 | MDReqID | Y | String | The MDReqID of the Market Data Request being rejected. |
| 281 | MDReqRejReason | N | Char | Enumerated reason. Currently typically 1 (Unknown symbol). |
| 58 | Text | N | String | Additional explanation for reject. |
| — | Standard Trailer | — | — |
Example:
8=FIX.4.4|9=128|35=Y|34=34|49=MEXEXCHNG|56=CLIENT1|52=20251007-14:53:01.456|262=MDREQ_004|281=1|58=Unknown symbol|10=187|
5.2.5 Market Data Incremental Refresh (MsgType = X)
Purpose: Delivers the initial book and real-time changes
Direction: Outbound (MEX Exchange → Client)
Sender: MEX Exchange
| Tag | Name | Req | Type | Notes |
|---|---|---|---|---|
| — | Standard Header | — | — | MsgType<35> = X |
| 262 | MDReqID | Y | String | Unique identifier of the market data request. |
| 167 | SecurityType | Y | String | FXSPOT, FXNDF (echoed from subscription when provided). |
| 63 | SettlType | N | String | Tenor / settlement period (echoed when provided). |
| 55 | Symbol | Y | String | Currency pair CCY/CCY. |
| 64 | SettlDate | Y | String | Settlement date YYYYMMDD. |
| 541 | MaturityDate | N | String | Fixing date for NDFs. YYYYMMDD |
| 268 | NoMDEntries | Y | Int | Number of market data entries. |
| > 279 | MDUpdateAction | Y | Char | 0 = New, 1 = Change, 2 = Delete |
| > 278 | MDEntryID | Y | String | Numeric order id as string. |
| > 270 | MDEntryPx | Y | Float | All-in market data entry price. |
| > 1026 | MDEntrySpotRate | N | Float | Spot rate for forward / NDF when available. |
| > 1027 | MDEntryForwardPoints | N | Float | Forward points relative to spot for all-in rate. |
| > 271 | MDEntrySize | Y | Float | Market data entry size. |
| > 269 | MDEntryType | Y | Char | 0 = Bid, 1 = Offer |
| — | Standard Trailer | — | — |
Notes: Apply updates sequentially. For FXNDF, MDEntrySpotRate and MDEntryForwardPoints are included when a matching spot mid is available.
Example:
8=FIX.4.4|9=198|35=X|34=39|49=MEXEXCHNG|56=CLIENT1|52=20251007-14:58:00.456|262=MDREQ_001|167=FXSPOT|55=EUR/USD|64=20251009|268=3|279=0|278=1001|270=1.08502|271=3000000|269=0|279=1|278=1002|270=1.08500|271=1500000|269=0|279=2|278=1003|270=1.08506|271=2500000|269=1|10=223|
5.3 Trading Messages
5.3.1 New Order Single (MsgType = D)
Purpose: Submits a new order
Direction: Inbound (Client → MEX Exchange)
Sender: Client
| Tag | Name | Req | Type | Notes |
|---|---|---|---|---|
| — | Standard Header | — | — | MsgType<35> = D |
| 11 | ClOrdID | Y | String | Unique order identifier set by client (24 char max). Recommend nanosecond timestamp integer. |
| 55 | Symbol | Y | String | Order instrument. |
| 54 | Side | Y | Char | 1 = Buy, 2 = Sell |
| 38 | OrderQty | Y | Float | Quantity in base currency. |
| 40 | OrdType | Y | Char | 1 = Market, 2 = Limit |
| 44 | Price | N | Float | Required for Limit orders. All-in price for forwards. Omit for Market orders. |
| 59 | TimeInForce | Y | Char | 0 = DAY, 3 = IOC, 4 = FOK |
| 60 | TransactTime | Y | UTCTimeStamp | Time of order sent. |
| 15 | Currency | N | String | Must be the base currency if present. Term currency is rejected. |
| 167 | SecurityType | Y | String | FXSPOT, FXNDF |
| 541 | MaturityDate | N | String | Fixing date YYYYMMDD. NDFs only. |
| 63 | SettlType | N | String | Tenor. |
| 389 | DiscretionOffsetValue | N | Float | Discretionary offset willing to add to cross the spread. |
| 583 | ClOrdLinkID | N | String | Optional link to a prior ClOrdID used as parent. Echoed on related Execution Reports. |
| — | Standard Trailer | — | — |
Notes: Rejects on invalid price/qty, unknown symbol, duplicate ClOrdID, disabled instrument/trading, or non-base Currency. DAY orders cannot have OrdType = MARKET. Account (1) and MinQty (110) are accepted by the dictionary but not applied.
Example:
8=FIX.4.4|9=198|35=D|34=50|49=CLIENT1|56=MEXEXCHNG|52=20251007-15:05:00.123|11=1728311100123456789|55=EUR/USD|54=1|38=1000000|40=2|44=1.08505|59=3|60=20251007-15:05:00.123|15=EUR|167=FXSPOT|10=234|
5.3.2 Order Status Request (MsgType = H)
Purpose: Queries order status
Direction: Inbound (Client → MEX Exchange)
Sender: Client
| Tag | Name | Req | Type | Notes |
|---|---|---|---|---|
| — | Standard Header | — | — | MsgType<35> = H |
| 41 | OrigClOrdID | N | String | ClOrdID of the order being queried. Used if OrderID is not provided. |
| 11 | ClOrdID | Y | String | Unique identifier for this status request (not used for order lookup). |
| 37 | OrderID | N | String | Exchange OrderID from a prior Execution Report. Preferred lookup key. |
| 55 | Symbol | Y | String | Instrument of the order. |
| — | Standard Trailer | — | — |
Notes: Lookup prefers OrderID (37); falls back to OrigClOrdID (41). Server responds with Execution Report (
ExecType=I). Unknown order returns Business Message Reject (j).
Example:
8=FIX.4.4|9=112|35=H|34=55|49=CLIENT1|56=MEXEXCHNG|52=20251007-15:10:00.789|11=STATUS_001|37=100001|55=EUR/USD|10=178|
5.3.3 Order Cancel Request (MsgType = F)
Purpose: Cancels an order
Direction: Inbound (Client → MEX Exchange)
Sender: Client
| Tag | Name | Req | Type | Notes |
|---|---|---|---|---|
| — | Standard Header | — | — | MsgType<35> = F |
| 41 | OrigClOrdID | Y | String | ClOrdID of the order to cancel. Required for lookup. |
| 11 | ClOrdID | Y | String | Client-specified ID for this cancel request. |
| 37 | OrderID | N | String | Present in the dictionary but not used for cancel lookup. |
| 55 | Symbol | Y | String | Instrument of the order to be canceled. |
| 60 | TransactTime | Y | UTCTimestamp | Time of cancel request creation. |
| — | Standard Trailer | — | — |
Notes: Cancel lookup is by OrigClOrdID only. Cannot cancel filled/IOC/FOK orders that are already terminal.
Example:
8=FIX.4.4|9=145|35=F|34=57|49=CLIENT1|56=MEXEXCHNG|52=20251007-15:12:00.456|41=1728311100123456789|11=1728311520456789012|55=EUR/USD|60=20251007-15:12:00.456|10=201|
5.3.4 Order Cancel Replace Request (MsgType = G)
Purpose: Modifies a resting DAY Limit order (price and/or quantity)
Direction: Inbound (Client → MEX Exchange)
Sender: Client
| Tag | Name | Req | Type | Notes |
|---|---|---|---|---|
| — | Standard Header | — | — | MsgType<35> = G |
| 41 | OrigClOrdID | Y | String | ClOrdID of the order to replace. |
| 11 | ClOrdID | Y | String | Client-specified ID for this replace request. |
| 54 | Side | Y | Char | 1 = Buy, 2 = Sell |
| 55 | Symbol | Y | String | Instrument symbol of the original order. |
| 59 | TimeInForce | Y | Char | 0 = DAY. FOK and IOC cannot be replaced. |
| 38 | OrderQty | N | Float | New quantity. |
| 44 | Price | N | Float | New price. Only LIMIT orders can change price. |
| 60 | TransactTime | Y | UTCTimestamp | Time of replace request creation. |
| 110 | MinQty | N | Float | Accepted by the dictionary but not applied. |
| — | Standard Trailer | — | — |
Example:
8=FIX.4.4|9=185|35=G|34=59|49=CLIENT1|56=MEXEXCHNG|52=20251007-15:14:00.123|41=1728311100123456789|11=1728311640123456789|54=1|55=EUR/USD|59=0|38=1500000|44=1.08508|60=20251007-15:14:00.123|10=234|
5.3.5 Order Cancel Reject (MsgType = 9)
Purpose: Rejects a cancel or cancel/replace request
Direction: Outbound (MEX Exchange → Client)
Sender: MEX Exchange
| Tag | Name | Req | Type | Notes |
|---|---|---|---|---|
| — | Standard Header | — | — | MsgType<35> = 9 |
| 37 | OrderID | Y | String | Order ID of the original order (or 0 when unknown). |
| 41 | OrigClOrdID | Y | String | OrigClOrdID from the rejected request. |
| 11 | ClOrdID | Y | String | ClOrdID from the rejected request. |
| 39 | OrdStatus | Y | Char | Status of the order that could not be canceled/replaced. |
| 102 | CxlRejReason | Y | Char | Typically 1 = Unknown Order. Other FIX values may appear. |
| 60 | TransactTime | Y | UTCTimeStamp | Time of the reject. |
| 434 | CxlRejResponseTo | Y | Char | 1 = Order Cancel Request, 2 = Order Cancel Replace Request |
| 58 | Text | Y | String | More information about the reject. |
| — | Standard Trailer | — | — |
Example:
8=FIX.4.4|9=178|35=9|34=61|49=MEXEXCHNG|56=CLIENT1|52=20251007-15:16:00.789|37=0|41=1728311100123456789|11=1728311520456789012|39=8|102=1|60=20251007-15:16:00.789|434=1|58=Order not found|10=223|
5.3.6 Execution Report (MsgType = 8)
Purpose: Reports order events (ack, fill, reject, replace, status)
Direction: Outbound (MEX Exchange → Client)
Sender: MEX Exchange
Status vs Event:
ExecType (150)tells you what just happened (event)OrdStatus (39)tells you the current order state (state)
Common combinations:
| ExecType (150) | OrdStatus (39) | Meaning |
|---|---|---|
| 0 | 0 | New |
| F | 1 | Trade (partial fill) |
| F | 2 | Trade (fully filled) |
| E | E | Pending Replace |
| 5 | 5 | Replaced |
| 4 | 4 | Canceled |
| 8 | 8 | Rejected |
| I | 0 | Order Status (response to Status Request) |
| Tag | Name | Req | Type | Notes |
|---|---|---|---|---|
| — | Standard Header | — | — | MsgType<35> = 8 |
| 11 | ClOrdID | Y | String | Unique order identifier set by client. |
| 37 | OrderID | Y | String | Unique order ID assigned by the venue (numeric string). |
| 17 | ExecID | Y | String | Unique ID for this execution report. |
| 39 | OrdStatus | Y | Char | 0=New, 1=Partially Filled, 2=Fully Filled, 4=Canceled, 5=Replaced, E=Pending Replace, 8=Rejected |
| 150 | ExecType | Y | Char | 0=New, 4=Canceled, 5=Replaced, E=Pending Replace, F=Trade, I=Order Status, 8=Rejected |
| 55 | Symbol | Y | String | Instrument symbol of the original order. |
| 54 | Side | Y | Char | 1 = Buy, 2 = Sell |
| 38 | OrderQty | Y | Float | Original order quantity. |
| 40 | OrdType | Y | Char | 1 = Market, 2 = Limit |
| 44 | Price | N | Float | Price of the original order (not the fill price). |
| 59 | TimeInForce | Y | Char | 0 = DAY, 3 = IOC, 4 = FOK |
| 31 | LastPx | N | Float | Fill price when ExecType=F. |
| 32 | LastQty | N | Float | Fill quantity when ExecType=F. |
| 151 | LeavesQty | N | Float | Remaining quantity to fill. |
| 14 | CumQty | Y | Float | Total quantity filled so far. |
| 6 | AvgPx | N | Float | Average fill price. Optional in the dictionary; not currently populated. |
| 541 | MaturityDate | N | Date | Fixing date YYYYMMDD. NDFs only. |
| 64 | SettlDate | Y | Date | Settlement date YYYYMMDD. |
| 75 | TradeDate | Y | Date | Trade date YYYYMMDD. |
| 60 | TransactTime | Y | UTCTimeStamp | Time of this report. |
| 167 | SecurityType | Y | String | FXSPOT, FXNDF |
| 195 | LastForwardPoints | N | Float | Forward points. Optional; not currently populated. |
| 58 | Text | Y | String | Extra information. |
| 583 | ClOrdLinkID | N | String | Echoed when the original order carried ClOrdLinkID. |
| — | Standard Trailer | — | — |
Example:
8=FIX.4.4|9=272|35=8|34=64|49=MEXEXCHNG|56=CLIENT1|52=20251007-15:17:02.789|11=1728311100123456789|37=100001|17=100003|39=2|150=F|55=EUR/USD|54=1|38=1000000|40=2|44=1.08505|59=3|31=1.08505|32=1000000|151=0|14=1000000|60=20251007-15:17:02.789|167=FXSPOT|64=20251009|75=20251007|58=Order fully filled|10=301|
6. Appendices
6.1 Business Rules Summary
6.1.1 Market Data
- Delivery: Incremental Refresh (
X) only — no Snapshot (W) - Initial book: Stream of
MDUpdateAction=0(New) entries after subscribe - MDEntryID: Numeric order id as string; may be recycled after delete
- Paired sessions: Market data requests rejected while Orders session is not logged in
- MarketDepth (264): Accepted but currently ignored
- Resend: Not supported for market data — resubscribe to realign
6.1.2 Order Management
- Supported Order Types: Limit (
40=2) and Market (40=1) - Time In Force: DAY (
59=0), IOC (59=3), FOK (59=4) - Currency: Base currency only; term-currency notionals are rejected
- Cancel lookup: OrigClOrdID required
- Status lookup: OrderID preferred, OrigClOrdID fallback
- Replace: DAY Limit orders only
- Cancel-on-disconnect: All open orders canceled on logout/disconnect
6.1.3 Order Side and Currency
The Side (54) field is from the client's perspective and always refers to the base currency of Symbol (55). OrderQty (38) is always in base currency. Currency (15) is optional; if present it must equal the base currency.
| Symbol | Side (54) | Currency (15) | Meaning |
|---|---|---|---|
| EUR/USD | 1 (Buy) | EUR or omitted | Buy base amount |
| EUR/USD | 2 (Sell) | EUR or omitted | Sell base amount |
| EUR/USD | 1 (Buy) | USD | Rejected — term currency not supported |
6.1.4 Security Types
- FXSPOT: Foreign exchange spot transactions
- FXNDF: Non-deliverable forwards
6.1.5 Book Building Rules
- Apply Incremental Refresh messages in arrival order
0 (New): Insert entry;1 (Change): Modify by MDEntryID;2 (Delete): Remove by MDEntryID- Treat unknown MDEntryID on modify/delete as out-of-sync — Clear book
- Discard entries with price=0 or size=0
- After unsubscribe / logout, discard local book state for that subscription
6.1.6 Supported Tenors
| Tenor |
|---|
| TOD |
| TOM |
| 2D |
| 3D |
| 4D |
| 5D |
| 6D |
| 1W |
| 2W |
| 3W |
| 1M |
| 2M |
| 3M |
| IMM1 |
| IMM2 |
| IMM3 |
| IMM4 |