Realtime

FIX 4.4

Institutional connectivity with the same key, the same guards and the same error codes as the Trading API. Two session types - QUOTE for market data and TRADE for orders - over TLS on port 5201.

#Session

Endpointapi.your-brand.com:5201 - the API host, TLS 1.2+ (your broker's panel shows the exact host and port)
VersionFIX 4.4, standard header and trailer, SOH-delimited (shown here with |)
SenderCompID (49)K<key id> - the numeric id of your Trading API key, e.g. K12
TargetCompID (56)The CompID shown in your broker's API access panel (default OCTOLIT)
TargetSubID (57)QUOTE or TRADE - one session type per connection; open both for a full setup
Password (554)Your API key (qk_…) with the fix scope
Sequence numbersSend 141=Y to reset both sides on logon (recommended); sessions are not resumed across reconnects
Heartbeat108 between 5 and 120 s; Test Request / Heartbeat as per FIX 4.4

#Logon (35=A)

TagValue
8FIX.4.4
35A
49K<key id> - the key id shown in the API access panel
56The TargetCompID shown in the panel (OCTOLIT in these examples)
57QUOTE or TRADE - the session you want
980
108Heartbeat interval, 5 - 120 s
141Y to reset sequence numbers on both sides
554Your API key (qk_…)
Logon
8=FIX.4.4 | 35=A | 49=K12 | 56=OCTOLIT | 57=TRADE | 34=1 | 98=0 | 108=30 | 141=Y | 554=qk_... |

A refused logon answers 35=5 Logout with the reason in 58 (one of the Trading API error codes, e.g. invalid_api_key, open_api_disabled, ip_not_allowed).

#QUOTE session - market data

You sendYou receive
35=V MarketDataRequest: 262 request id, 263 0 snapshot / 1 snapshot + updates / 2 unsubscribe, 264=0, 265, 267 with 269 0 bid / 1 offer, 146 + 55 per symbol (X:EURUSD, the numeric id, or EUR-USD). Up to 100 symbols.35=W snapshot per symbol, then 35=X incremental refreshes (at most one per symbol every 250 ms). Unknown symbol: 35=Y with 281=0.
Quotes are the trading prices (bid / ask with the account type's spread) - the same values the Trading API and the WebSocket deliver.

#TRADE session - orders

MessageTagsAnswer
D NewOrderSingle11 ClOrdID, 1 trading account id (optional with one account), 55 symbol or id (or 48 + 22=8), 54 1 buy / 2 sell, 38 quantity in units (lots x contract size), 40 1 market / 2 limit (44) / 3 stop (99), 59 1 (GTC), 9101 stop loss, 9102 take profit, 9103 leverage35=8 150=0 New, then 150=F 39=2 for a market order (31/32); 150=8 Rejected with 103 + 58
D + 721 (close)721 position id, 54 the opposite side, 38 the whole position or less (partial close where allowed)150=0 + 150=F, OrderID C<closed row id>, 721 = the position
F OrderCancelRequest11 new ClOrdID, 41 the order's ClOrdID (or 37)150=4 39=4; a filled order: 35=9 102=0; unknown: 35=9 102=1
G OrderCancelReplaceRequest11, 41 (or 37), 44 / 99 new price (pending), 9101 / 9102 (0 removes); quantity and type cannot change150=5 Replaced; refused: 35=9 434=2
H OrderStatusRequest11 or 37150=I; unknown: 150=I 39=8 103=5
AF OrderMassStatusRequest584, optional 1 / 55150=I per pending order and open position, 911 total, 912=Y on the last
AN RequestForPositions710, 724=0, optional 1 / 5535=AO then one 35=AP per open position (721, 704/705, 730 open price, 9101/9102)
NewOrderSingle - buy 10 000 EURUSD at 1.0750 limit with a stop loss
8=FIX.4.4 | 35=D | 49=K12 | 56=OCTOLIT | 57=TRADE | 34=2 | 11=my-order-1 | 1=55 | 55=X:EURUSD | 54=1 | 38=10000 | 40=2 | 44=1.0750 | 59=1 | 9101=1.0700 | 60=20261010-12:00:00.000 |
ExecutionReport - 150=0 New
8=FIX.4.4 | 35=8 | 49=OCTOLIT | 50=TRADE | 56=K12 | 37=812 | 11=my-order-1 | 17=... | 150=0 | 39=0 | 1=55 | 55=X:EURUSD | 54=1 | 40=2 | 44=1.0750 | 38=10000 | 14=0 | 151=10000 | 6=0 | 721=812 | 9101=1.07 |
  • 11 ClOrdID is the client_order_id of the REST API: the same value is idempotent across FIX and REST.
  • Quantity 38 is in units (lots × contract size). 44 limit price, 99 stop price. Time in force is 59=1 (GTC); a market order fills or rejects at once.
  • Market fills answer 150=0 then 150=F 39=2 with 31 price and 32 quantity; the position id comes in 721.
  • Every reject (150=8, 35=9, 35=3) carries the REST error code in 58, so one error table serves both protocols.

#Reject reasons (103)

0OrdRejReasonRefused by the broker
1OrdRejReasonUnknown symbol
2OrdRejReasonMarket closed
3OrdRejReasonOrder exceeds limit
5OrdRejReasonUnknown order
6OrdRejReasonDuplicate ClOrdID
11OrdRejReasonUnsupported order characteristic
13OrdRejReasonIncorrect quantity
99OrdRejReasonOther - see tag 58 (REST error code)

#Limits

TransportTCP + TLS 1.2 or newer
VersionFIX 4.4
HeartBtInt (108)5 - 120 s
Messages per second per session50 (burst 100)
Logons per minute per address30
Connections per address20
Symbols per QUOTE session100
Quote updatesat most one X per symbol every 250 ms

#Custom tags

TagMeaning
9101Stop loss price (absolute). 0 in a replace removes it.
9102Take profit price (absolute). 0 in a replace removes it.
9103Leverage for the order, when the symbol offers a choice.
721Position id - set on fills, used in a close (D with 721) and in position reports (AP).

Need a certification session or a sample log? Ask your broker; the FIX message lab builds and parses messages in the browser.