Maker Trade FIX 4.4
Trading API implementation that allows Market Makers to receive orders from PrimeXM XCore and report their executions.
Rules of Engagement
PrimeXM endeavours to ensure that the data and other material in this publication are correct and complete but does not accept liability for any error herein or omissions. The development of PrimeXM’s products and services is continuous and published information may not be up to date.
Change Log
FIX API 1.0.2
Version: 1.0.2
XCore: 6.01.73
Changes:
- Added ResendRequest max count limit is 30.
Notes:
- When the limit is exceeded, the maker is automatically disabled.
- To re-enable it, the maker must be manually disabled and enabled again.
Introduction
- Scope of this document
This document is intended to serve software developers as an implementation guide for the PrimeXM Maker FIX API.
- FIX version
PrimeXM supports FIX version 4.4. For further information about this version please refer to the specifications published by the FIX Protocol Organization under http://www.fixprotocol.org/specifications/FIX.4.4
- FIX sessions
For better separation of pricing and trading data, Makers need to ensure two separate FIX connections (with two separate login credentials) to the PrimeXM FIX Server, one for pricing and one for trading data.
Messages
As defined in the FIX protocol, the PrimeXM FIX server is using two different data levels: Session and Application. The Session level handles the delivery of data and the Application level defines the business-related data content. The following session and application messages are supported by the PrimeXM FIX Engine:
Session Level Messages:
- Heartbeat (PrimeXM ↔ Maker)
- Test Request (PrimeXM ↔ Maker)
- Logon (PrimeXM → Maker)
- Logout (PrimeXM ↔ Maker)
- Resend Request (PrimeXM ↔ Maker)
- Reject (PrimeXM ↔ Maker)
- Sequence Reset (PrimeXM ↔ Maker)
Application Level Messages:
- New Order Single (PrimeXM → Maker)
- Order Cancel Request (PrimeXM → Maker)
- Execution Report (PrimeXM ← Maker)
Session Messages
Heartbeat Example
PrimeXM ↔ Maker: 8=FIX.4.4 9=80 35=0 49=Maker01 56=PXM_Txx 34=23667 52=20151105-12:26:48.467 10=252
Test Request
| Tag | Field name | Req’d | Comments |
|---|---|---|---|
| Standard Header | Y | MsgType=1 | |
| 112 | TestReqID | Y | A unique identifier for this test message |
| Standard Trailer | Y |
Test Request Example
PrimeXM ↔ Maker: 8=FIX.4.4 9=103 35=1 49=Maker01 56=PXM_Txx 34=23675 52=20151105-12:30:53.466 112=500041853466910000 10=132
Logon
| Tag | Field name | Req’d | Comments |
|---|---|---|---|
| Standard Header | Y | MsgType=A | |
| 108 | HeartBtInt | Y | Heart beat interval in seconds |
| 141 | ResetSeqNumFlag | N | Indicates both sides of a FIX session should reset sequence numbers |
| 553 | Username | Y | Username (provided by Maker) |
| 554 | Password | Y | Password (provided by Maker) |
| Standard Trailer | Y |
Logon Example
Request (PrimeXM → Maker): 8=FIX.4.4 9=101 35=A 34=1 49=PXM_Qxx 52=20150513-09:13:42.342 56=Maker01 98=0 108=30 141=Y 553=username_quote 554=password 10=108
Reply (PrimeXM ← Maker): 8=FIX.4.4 9=91 35=A 34=3 49=Maker01 52=20150513-09:13:42.343 56=PXM_Qxx 98=0 108=30 10=117
Logout
| Tag | Field name | Req’d | Comments |
|---|---|---|---|
| Standard Header | Y | MsgType=5 | |
| 58 | Text | N | Reason for logout |
| Standard Trailer | Y |
Logout Example
Request (PrimeXM → Maker): 8=FIX.4.4 9=51 35=5 34=148 49=PXM_Qxx 52=20150513-09:13:42.343 56=Maker01 10=224
Reply (PrimeXM ← Maker): 8=FIX.4.4 9=50 35=5 34=53 49=Maker01 52=20150513-09:13:42.344 56=PXM_Qxx 10=170
Resend Request
| Tag | Field name | Req’d | Comments |
|---|---|---|---|
| Standard Header | Y | MsgType=2 | |
| 7 | BeginSeqNo | Y | |
| 16 | EndSeqNo | Y | |
| Standard Trailer | Y |
Resend Request Example
PrimeXM ↔ Maker: 8=FIX.4.4 9=68 35=2 34=89279 49=Maker01 52=20151102-09:11:56.650 56=PXM_Txx 7=93784 16=0 10=002
Resend Request Limits
After receiving 30 Resend Requests in one FIX session, XCore disables the affected ProviderConfig connection. Set that connection’s active field to 1 to reconnect. The counter resets at logon.
Reject
| Tag | Field name | Req’d | Comments |
|---|---|---|---|
| Standard Header | Y | MsgType=3 | |
| 45 | RefSeqNum | Y | MsgSeqNum of the rejected message |
| 371 | RefTagID | N | The tag number of the FIX field being referenced |
| 372 | RefMsgType | N | The MsgType of the FIX message being referenced |
| 373 | SessionRejectReason | N | Code to identify the reason for a session-level |
| Standard Trailer | Y |
Reject Request Example
PrimeXM ← Maker: 8=FIX.4.4 9=61 35=2 49=Maker01 56=PXM_Txx 34=4 52=20260923-09:59:02.705 7=1 10=116
PrimeXM → Maker: 8=FIX.4.4 9=105 35=3 34=4 49=PXM_Txx 52=20260923-09:59:02.705 56=Maker01 45=4 58=Required tag missing 371=16 372=2 373=1 10=147
Sequence Reset
| Tag | Field name | Req’d | Comments |
|---|---|---|---|
| Standard Header | Y | MsgType=4 | |
| 123 | GapFillFlag | N | |
| 36 | NewSeqNo | Y | |
| Standard Trailer | Y |
Sequence Reset Example
PrimeXM ↔ Maker: 8=FIX.4.4 9=97 35=4 34=93784 43=Y 49=Maker01 52=20151102-09:11:50.760 56=PXM_Txx 122=20151102-09:11:50 36=93786 123=Y 10=184
Application Level Messages
New Order Single
| Tag | Field name | Req’d | Comments |
|---|---|---|---|
| Standard Header | Y | MsgType=D | |
| 11 | ClOrdID | Y | Unique identifier sent by PrimeXM |
| 1 | Account | N | Value 0 of the matching DealerLink rule; otherwise the provider configuration setting Account (AccountMetals for XAU, XAG, XPD and XPT symbols); omitted when none is set. |
| 55 | Symbol | Y | Symbol to trade on |
| 54 | Side | Y | Side of order in the symbol’s base currency: 1 = Buy 2 = Sell |
| 38 | OrderQty | Y | The order amount in the symbol’s base currency |
| 40 | OrdType | Y | Type of order: 1 = Market 2 = Limit XCore handles Stop triggers internally and sends the resulting execution requests as Market or Limit orders. |
| 44 | Price | Y | Order price supplied by XCore; present for both Market and Limit orders. |
| 110 | MinQty | N | Minimum accepted fill size. Defaults to 0.0 0.0 <= x <= OrderQty If MinQty = OrderQty (tag #38) then the trade will either be fully filled or rejected. If MinQty is set to x, with 0.0 < x < OrderQty, then the trade can be partially filled in multiple deals, each deal not smaller than x. |
| 115 | OnBehalfOfCompID | N | Value 1 of the matching DealerLink rule, for example #sub1# for the client order’s SubID1; omitted when the value is n/a.String value. Assigned value used to identify firm originating message if the message was delivered by a third party i.e. the third party firm identifier would be delivered in the SenderCompID field and the firm originating the message in this field. |
| 116 | OnBehalfOfSubID | N | Value 2 of the matching DealerLink rule, for example #sub2# for the client order’s SubID2; omitted when the value is n/a.String value. Assigned value used to identify specific message originator (i.e. trader) if the message was delivered by a third party |
| 526 | SecondaryClOrdID | N | Value 3 of the matching DealerLink rule, for example #sub3# for the client order’s SubID3; omitted when the value is n/a.String value. Assigned by the party which originates the order. Can be used to provide the ClOrdID (11) used by an exchange or executing system. Note: with #sub3#, MT4/MT5 orders carry the MT4/MT5 login. |
| 527 | SecondaryExecID | N | Value 4 of the matching DealerLink rule, for example #sub4# for the client order’s SubID4; omitted when the value is n/a.String value. Assigned by the party which accepts the order. Can be used to provide the ExecID (17) used by an exchange or executing system. Note: with #sub4#, MT4 orders carry the MT4 ticket. |
| 10000 | ttl | N | Time in Milliseconds an open order will stay active in the system. As the ttl expires the remaining amount of an open order will be cancelled and the order will be closed. The ttl can be any integer value >= 0; |
| 10001 | deviation | N | Double value. Accepted deviation from the price submitted in tag 44. Only applicable if 40=2. Defaults to 0.0. Setting this value to 0.00002 for a sell EURUSD limit order would allow for execution on prices as low as 0.2 pips below the specified price. The preferred mode of operation for limit orders is to set tag 44 at current market price and use tag 10001 to define a specific slippage acceptance |
| 60 | TransactTime | Y | Timestamp of order request |
| 59 | TimeInForce | N | Sent only by the PRIMEXM_FIX44_FR provider type. |
| Standard Trailer | Y |
New Order Single Example
PrimeXM → Maker: 8=FIX.4.4 9=184 35=D 34=4 49=PXM_Txx 52=20260923-09:56:37.734 56=Maker01 115=S1 116=S2 1=LPACC1 11=268-0 38=1000.0 40=1 44=1.1004 54=1 55=EUR/USD 60=20260923-09:56:37.734 110=0 526=S3 527=S4 10000=60 10=157
Order Cancel Request
| Tag | Field name | Req’d | Comments |
|---|---|---|---|
| Standard Header | Y | MsgType=F | |
| 41 | OrigClOrdID | Y | Tag 11 in the original NewOrderSingle message. |
| 11 | ClOrdID | Y | Tag 11 in the original NewOrderSingle message (same value as tag 41). |
| 54 | Side | Y | Tag 54 in the original NewOrderSingle message. |
| 55 | Symbol | Y | Tag 55 in the original NewOrderSingle message. |
Order Cancel Request Example
8=FIX.4.4 9=67 35=F 34=10987 49=PXM_Txx 52=20151029-11:16:50.014 56=Maker01 41=2025301 11=2025301 55=EUR/USD 54=1 10=233
Execution Report
| Tag | Field name | Req’d | Comments |
|---|---|---|---|
| Standard Header | Y | MsgType=8 | |
| 11 | ClOrdID | Y | Must be the same as ClOrdID sent in NewOrderSingle |
| 17 | ExecID | C | ExecID generated by the maker |
| 150 | ExecType | Y | The execution report’s type. 0 = New 1 = Partial Fill 2 = Fill F = Trade 4 = Canceled 8 = Rejected |
| 37 | OrderID | C | OrderID generated by the maker |
| 39 | OrdStatus | Y | Current order state. 0 = New A = Pending New 1 = Partially filled 2 = Filled 4 = Canceled 6 = Pending Cancel 8 = Rejected C = Expired XCore first treats ExecType 1, 2 or F as fills; OrdStatus 2 or 4 completes the leg. Otherwise, OrdStatus 4 or C, or OrdStatus 1 with ExecType 4, is treated as cancellation, and OrdStatus 8 as rejection. Remaining reports with OrdStatus 0, A or 6, or ExecType 6, are accepted without action. |
| 32 | LastQty | C | Quantity of this fill. Note: If ExecType in tag 150 = F and OrdStatus in tag 39 = 1 or 2, this tag will be populated |
| 31 | LastPx | C | Price of this fill. Note: If ExecType in tag 150 = F and OrdStatus in tag 39 = 1 or 2, this tag will be populated |
| 64 | SettlDate | C | ValueDate of execution. Note: If ExecType in tag 150 = F and OrdStatus in tag 39 = 1 or 2, this tag will be populated |
| 58 | Text | N | Free format text string |
| 60 | TransactTime | C | Time the transaction represented by this ExecutionReport occurred Note: If ExecType in tag 150 = F, this tag will be populated |
| Standard Trailer | Y |
Execution Report Example
PrimeXM ← Maker: 8=FIX.4.4 9=218 35=8 49=Maker01 56=PXM_Txx 34=8 52=20260923-09:56:42.568 37=MK-ORD-2 11=270-0 17=MK-EXEC-5 150=F 39=2 55=EUR/USD 54=2 38=800000.0 40=2 44=1.1 31=1.1 32=500000 64=20260925 151=0 14=800000 6=1.1 60=20260923-09:56:42.568 10=252
Full Trading Session Example
Filled order:
PrimeXM → Maker: 8=FIX.4.4 9=184 35=D 34=4 49=PXM_Txx 52=20260923-09:56:37.734 56=Maker01 115=S1 116=S2 1=LPACC1 11=268-0 38=1000.0 40=1 44=1.1004 54=1 55=EUR/USD 60=20260923-09:56:37.734 110=0 526=S3 527=S4 10000=60 10=157
PrimeXM ← Maker: 8=FIX.4.4 9=173 35=8 49=Maker01 56=PXM_Txx 34=4 52=20260923-09:56:37.735 37=MK-ORD-1 11=268-0 17=MK-EXEC-1 150=0 39=0 55=EUR/USD 54=1 38=1000.0 151=1000.0 14=0 6=0 60=20260923-09:56:37.735 10=203
PrimeXM ← Maker: 8=FIX.4.4 9=192 35=8 49=Maker01 56=PXM_Txx 34=5 52=20260923-09:56:37.736 37=MK-ORD-1 11=268-0 17=MK-EXEC-2 150=F 39=2 55=EUR/USD 54=1 38=1000.0 151=0 14=1000.0 6=1.1 60=20260923-09:56:37.736 31=1.1 32=1000.0 10=060
Rejected order:
PrimeXM → Maker: 8=FIX.4.4 9=156 35=D 34=7 49=PXM_Txx 52=20260923-09:56:47.304 56=Maker01 1=LPACC1 11=272-0 38=1000.0 40=1 44=1.1004 54=1 55=EUR/USD 60=20260923-09:56:47.303 110=0 10000=60 10=021
PrimeXM ← Maker: 8=FIX.4.4 9=213 35=8 49=Maker01 56=PXM_Txx 34=9 52=20260923-09:56:47.406 37=MK-ORD-3 11=272-0 17=MK-EXEC-6 150=8 39=8 55=EUR/USD 54=1 38=1000.0 40=1 44=1.1004 151=0 14=0.0 6=0.0 60=20260923-09:56:47.405 58=Insufficient liquidity 10=206
Partial fill:
PrimeXM → Maker: 8=FIX.4.4 9=163 35=D 34=5 49=PXM_Txx 52=20260923-09:56:41.866 56=Maker01 1=LPACC1 11=270-0 38=800000.0 40=2 44=1.1 54=2 55=EUR/USD 60=20260923-09:56:41.866 110=0 10000=60 10001=0 10=083
PrimeXM ← Maker: 8=FIX.4.4 9=193 35=8 49=Maker01 56=PXM_Txx 34=6 52=20260923-09:56:41.966 37=MK-ORD-2 11=270-0 17=MK-EXEC-3 150=0 39=0 55=EUR/USD 54=2 38=800000.0 40=2 44=1.1 151=800000.0 14=0.0 6=0.0 60=20260923-09:56:41.966 10=098
PrimeXM ← Maker: 8=FIX.4.4 9=225 35=8 49=Maker01 56=PXM_Txx 34=7 52=20260923-09:56:42.267 37=MK-ORD-2 11=270-0 17=MK-EXEC-4 150=F 39=1 55=EUR/USD 54=2 38=800000.0 40=2 44=1.1 31=1.1 32=300000 64=20260925 151=500000.0 14=300000 6=1.1 60=20260923-09:56:42.267 10=059
PrimeXM ← Maker: 8=FIX.4.4 9=218 35=8 49=Maker01 56=PXM_Txx 34=8 52=20260923-09:56:42.568 37=MK-ORD-2 11=270-0 17=MK-EXEC-5 150=F 39=2 55=EUR/USD 54=2 38=800000.0 40=2 44=1.1 31=1.1 32=500000 64=20260925 151=0 14=800000 6=1.1 60=20260923-09:56:42.568 10=252
Information needed from Maker
Please see below the information required to be provided by the Maker in order for PrimeXM to connect and perform UAT conformance testing:
Trading session
| Field Name | Example | Comments |
|---|---|---|
| LoginUsername | Client123 | Client’s login username |
| LoginPassword | password#@! | Client’s login password |
| SenderCompID | PXM_Txx | Unique client’s Trading session identifier (value cannot be “PXM”) |
| TargetCompID | Maker-123 | Unique Maker identifier |
| SocketConnectHost | 203.0.113.10 | Maker’s FIX engine IP address or hostname used for establishing Trading session connectivity |
| SocketConnectPort | 2501 | Maker’s FIX engine Port used for establishing Trading session connectivity |
| ResetOnLogon | N | Predefined by PrimeXM, not changeable |
| Sessions | FRI17:05:30-FRI17:05:00 (America/New_York) | Predefined by PrimeXM, not changeable |
| SocketUseSSL | Y | Predefined by PrimeXM, not changeable |
PrimeXM requires SocketUseSSL to secure the FIX trading sessions. Pricing sessions are not SocketUseSSL encrypted in general. Once the connection to the Maker FIX server is established PrimeXM will authenticate against the server with a username and password added to the logon (MsgType=A) message