Xhub Taker Fix API Specs
Xhub Taker Fix API Specs
xHub FIX API supports connectivity, quote streaming (including subscription and incremental updates),
and order execution functionality. Prior to connecting to xHUB taker must complete request form
to specify the IP from which the client will be connecting.
Connectivity
1. Client open socket connection to xHUB FIX Server
2. Client send FIX Logon Message (35=A)
3. xHUB Gateway sends FIX Logon Response (35=A)
4. xHUB / Client exchange heartbeat occurs (35=0)
Credentials
Customers connecting to the xHUB FIX API will receive the following information from xHUB
which should remain configurable within their FIX Engine:
Quote Session
IP Address
Port
SenderCompID
TargetCompID
Password
Trade Session
IP Address
Port
SenderCompID
TargetCompID
Password
Hong Kong office: 14 Shun Ho Tower 24-30 Ice House Street Central, Hong Kong
https://xhub.trade/
FIX API Specs
Connection KeepAlive Requirements
Clients connected to xHUB are required to send a heartbeat (35=0) message to xHUB on each
connect FIX session at least once every 30 seconds.
Hong Kong office: 14 Shun Ho Tower 24-30 Ice House Street Central, Hong Kong
https://xhub.trade/
FIX API Specs
Standard Header
Standard header included on all FIX Messages sent / received by xHUB.
Standard Header
Tag Field Name Required Value Type Comments
8 BeginString Y FIX String First field in message.
4.4
9 BodyLength Y - Intege Second field in message.
r
35 MessageType Y - String The sequence of the message.
Can be embedded outside of
header.
34 MsgSeqNum Y - Intege The sequence number of the
r message.
Can be embedded outside of
header.
Hong Kong office: 14 Shun Ho Tower 24-30 Ice House Street Central, Hong Kong
https://xhub.trade/
FIX API Specs
Logon
A logon message is sent by the client to initiate a FIX session. The xHUB FIX implementation
includes the password for authentication purposes in the original logon message.
Logon (MsgType, 35=A)
Tag Field Name Required Value Type Comments
<Standard Header>
98 EncryptMethod Y 0 Integer Must be type 0 (none).
108 HeartBInt Y - Integer How often the client would like
to receive a periodic heartbeat
from xHUB, in seconds.
This value should be 60 or less.
Heartbeat
A Heartbeat message is sent by xHUB to the client, or the client to xHUB, as a keep-alive utility
and means of verifying FIX connectivity. A response is sent to a Test Request.
Heartbeat (35=0)
Tag Field Name Required Value Type Comments
<Standard Header>
112 TestReqID N - String The Test Request ID.
Hong Kong office: 14 Shun Ho Tower 24-30 Ice House Street Central, Hong Kong
https://xhub.trade/
FIX API Specs
Test Request
A Test Request message is sent by xHUB to the client, or the client to xHUB as a means of
verifying two-way FIX connectivity.
A heartbeat is sent in response to a Test Request.
Test Request (35=1)
Tag Field Required Value Type Comments
Name
<Standard Header>
112 TestReqID N - String If responding to a Test Request, the Test
Request ID.
Resend Request
The resend request is sent by the receiving application to initiate the retransmission of
messages.
The function is utilized when a sequence number gap is detected, the receiving application lost
a message, or as a function of the initialization process.
Resend Request (MsgType, 35=2)
Tag Field Name Required Value Type Comments
<Standard Header>
7 BeginSeqNo Y - Intege The first sequence number from this
r session to resend.
16 EndSeqNo Y - Intege The last sequence number from this
r session to resend. Set to 0 to resend all
message following the BeginSeqNo.
Hong Kong office: 14 Shun Ho Tower 24-30 Ice House Street Central, Hong Kong
https://xhub.trade/
FIX API Specs
Reject
A reject message is sent in response to an unsupported or badly formed FIX message from the
client to xHUB. When possible, a reason and explanation for the rejection is supplied.
Note: A FIX reject is different than a trade level reject, which would be sent via an FIX
Messaging. The Reject message is only for administrative / system level message rejects.
Reject (35=3)
Tag Field Name Required Value Type Comments
<Standard Header>
371 RefTagID N - Intege The FIX tag of the field which
r caused the FIX reject.
372 RefMsgType N - Intege The MsgType of the message
r caused that caused the FIX
Reject.
373 SessionRejectReaso N - Intege An enumerated reason for the
n r FIX Reject.
45 RefSeqNum Y - Intege The MsgSeqNum of the message
r causing the FIX Reject.
58 Text N - String Text explaining the FIX Reject.
Hong Kong office: 14 Shun Ho Tower 24-30 Ice House Street Central, Hong Kong
https://xhub.trade/
FIX API Specs
Logout
A logout message is sent by xHUB to the client, or the client to xHUB, to terminate a FIX
session. Most FIX engines will automatically generate the logout message and response. When
applicable, the xHUB FIX engine will provide a reason for the logout in the Text (58) field.
Logout (35=5)
Tag Field Name Required Value Type Comments
<Standard Header>
35 MsgType Y 5 String Tag 35=5 indicates logout
58 Test N - Text Reason for the logout, if
available
Hong Kong office: 14 Shun Ho Tower 24-30 Ice House Street Central, Hong Kong
https://xhub.trade/
FIX API Specs
Quote
Once connected to the xHUB FIX API Quote Session, the client can subscribe to streaming
quote updates from xHUB using a MarketDataRequest (35=V).
The xHUB FIX engine will respond with a MarketDataRequestReject or a request with any
invalid symbols. It is recommended to use a single MarketDataRequest (35=V) per symbol.
For any valid MarketDataRequest (35=V) , the xHUB FIX API will respond with a
MarketDataSnapshot / FullRefresh (35=W) for each symbol and continue streaming quote
updates for the duration of the FIX session.
Client can cancel streaming for any particular symbol, or a group of symbols, using a
MarketDataSnapshot / FullRefresh (35=W)with SubscriptionRequestType set to
DisablePreviousUpdates.
Messaging Sequence
1. Client sends MarketDataRequest (35=V) message(s)
2. xHUB responds with MarketDataRequestReject (35=Y)
● or a single MarketDatasnapshot / FullRefresh (35=W) messages (if 263=0).
● or streaming MarketDatasnapshot / FullRefresh (35=W) messages if (263 =
1).
1. Client sends MarketDataRequest (35=V) with 2 to cancel streaming (if 263=2).
● or streaming stops upon Logout.
Hong Kong office: 14 Shun Ho Tower 24-30 Ice House Street Central, Hong Kong
https://xhub.trade/
FIX API Specs
MarketDataRequest
MarketDataRequest (35=V)
Tag Field Name RQ V Type Comments
a
e
<StandardHeader>
262 MQReqID Y - String A unique (per session) ID for the Market
Data Request. xHUB recommends includes a
timestamp in the field to ensure uniqueness
per request.
265 MDUPDateType Y 0 INT Must be set to 0 (Full Refresh). All layers will
be updated in each MarketDataSnapshot.
Hong Kong office: 14 Shun Ho Tower 24-30 Ice House Street Central, Hong Kong
https://xhub.trade/
FIX API Specs
>55 Symbol Y - String Instrument symbol to be quoted
(for FX, use CCY1CCY2 format)
MarketDataRequestReject
MarketDataRequestReject (35=Y)
Tag Field Name R V Type Comments
<StandardHeader>
262 MQReqID Y - String A unique (per session) ID for the Market
Data Request. xHUB recommends
includes a timestamp in the field to
ensure uniqueness per request.
Hong Kong office: 14 Shun Ho Tower 24-30 Ice House Street Central, Hong Kong
https://xhub.trade/
FIX API Specs
MarketDataSnapshot/Full Refresh
MarketDatasnapshot / FullRefresh (35=W)
Tag Field Name Required Value Type Comments
<StandardHeader>
262 MDReqID Y - String The MDReqID or the originating
MarketDataRequest message.
55 Symbol Y -S String Symbol being quotes in (in
CCY1CCY23 format for FX)
268 NoMDEntries Y - Integer Number of MDEntries following.
->270 MDEntryType Y - Price The price of MDEntry
Hong Kong office: 14 Shun Ho Tower 24-30 Ice House Street Central, Hong Kong
https://xhub.trade/
FIX API Specs
Quote Cancel
Quote Cancels are only sent for 1...<NoQuoteEntries> symbols or for all quotes.
Quote Cancel (35=Z)
Tag Field Name RQ V Typ Comments
e
<Standard Header>
117 QuoteID Y - Strin Unique Quote ID in reference to
g the Cancel message.
298 QuoteCancelT Y - Inte 4 = Cancel All Quotes
ype ger 1 = Cancel Symbols
Hong Kong office: 14 Shun Ho Tower 24-30 Ice House Street Central, Hong Kong
https://xhub.trade/
FIX API Specs
Trading
After connecting to the xHUB FIX API Trade Session:
Messaging Sequence
1. Client sends NewOrderSingle (35=D)Message.
2. xHUB responds with ExecutionReport ExecType = Pending New (A)
3. xHUB responds with 0..n ExecutionReport OrdStatus = Partially Filled (1), ExecType
= Trade (F)
4. xHUB responds with an ExecutionReport ExecType= Trade (F)
● or with an ExecutionReportExecType = Canceled (4)
● or with an ExecutionReport ExecType= Rejected (8)
Hong Kong office: 14 Shun Ho Tower 24-30 Ice House Street Central, Hong Kong
https://xhub.trade/
FIX API Specs
Order Type / Time in Force Chart.
Order Type IOC GTC FOK
Market Only makes 1 Will attempt to Only makes 1 pass to fill
pass to fill the fill the order the order.
order. until the market
Will use best timeout value is
price for volume reached.
requested. Will use best
price for
volume
requested.
Hong Kong office: 14 Shun Ho Tower 24-30 Ice House Street Central, Hong Kong
https://xhub.trade/
FIX API Specs
Previously Quoted Only makes 1 <Not Supported> Only makes 1 pass to fill
pass to fill the the order.
order. Must match a quote
Order must whose volume that meets
specify a quote or exceeds that
previously requested volume. Will
received from not sweep the book.
the maker. If Order must specify a
that quote is quote previously received
unknown or from the Maker. If that
invalid, the quote is unknown or
order will be invalid, the order will be
canceled. canceled.
Hong Kong office: 14 Shun Ho Tower 24-30 Ice House Street Central, Hong Kong
https://xhub.trade/
FIX API Specs
NewOrderSingle
NewOrderSingle (35=D)
Tag Field Name RQ V Type Comments
<Standard Header>
1 Account N - String User defined account name.
For retails systems, should be a
unique identifier for the
underlying trade group.
Hong Kong office: 14 Shun Ho Tower 24-30 Ice House Street Central, Hong Kong
https://xhub.trade/
FIX API Specs
2 = Sell
Hong Kong office: 14 Shun Ho Tower 24-30 Ice House Street Central, Hong Kong
https://xhub.trade/
FIX API Specs
117 QuoteID Y/N - String Unique Quote ID for specific
quote being traded on.
Required only for Previously
Quoted (40=D) orders.
Ignored for all other order
types.
Hong Kong office: 14 Shun Ho Tower 24-30 Ice House Street Central, Hong Kong
https://xhub.trade/
FIX API Specs
ExecutionReport
Execution Report (35=8)
Tag Field Name R V Type Comments
Q
<Standard Header>
11 ClOrdID N - String User defined account name. For
retail systems, should be a unique
identifier for the underlying trader.
For individual trades, can be set to
any value or omitted.
37 OrderID Y - String A Unique Order ID assigned to the
original order by the FIX engine.
Hong Kong office: 14 Shun Ho Tower 24-30 Ice House Street Central, Hong Kong
https://xhub.trade/
FIX API Specs
39 OrdStatus Y - Integer Describes the current state of the
order corresponding to this
execution report.
A = Pending New (Received)
1 = Partially Filled (Open with
some fills but not completely
filled)
2 = Fill (Completely filled)
4 = Canceled (Canceled, can still
have fills, but is not a complete
fill.)
8 = Rejected (Rejected, no fills)
Hong Kong office: 14 Shun Ho Tower 24-30 Ice House Street Central, Hong Kong
https://xhub.trade/
FIX API Specs
38 OrderQty Y - Qty Original order quantity. Does not
indicate a filled amount. For
reference only.
40 OrdType Y - Integer Enumerated Order Type from the
original request. For reference
only.
1 = Market
2 = Limit
D = Previously Quoted.
Hong Kong office: 14 Shun Ho Tower 24-30 Ice House Street Central, Hong Kong
https://xhub.trade/
FIX API Specs
6 AvgPx Y - Price The Average Price of all fills for this
request, including this fill. Will be 0
if ExecType is Pending New.
Hong Kong office: 14 Shun Ho Tower 24-30 Ice House Street Central, Hong Kong
https://xhub.trade/
FIX API Specs
=> 437 ContraTrade N - Qty Quantity of the trade attributable
Qty to the ContraBroker specified in tag
375.
OrderCancelRequest
OrderCancelRequest (35 = F)
Tag Field Name RQ V Type Comments
<Standard Header>
41 OrigClOrdID Y - String The ClOrdID from the original order the client wishes
to cancel.
11 ClOrdID Y - String A unique ID to identify this cancel request in specific
Hong Kong office: 14 Shun Ho Tower 24-30 Ice House Street Central, Hong Kong
https://xhub.trade/
FIX API Specs
OrderCancelReject
OrderCancelReject (35=9)
Tag Field Name RQ V Type Comments
<Standard Header>
37 OrderID Y - String A unique order ID assigned to the
original accepted order by the FIX
Engine. Will be 'None' if CxlRejREason
=1
41 OrigCLOrdID Y - String The ClOrdID from the original order
the client wishes to cancel.
11 ClORdID Y - String The unique ID to identify the
originating cancel request.
39 OrdStatus Y - Integer Enumeration indicating the status of
the order cancel attempt.
102 CxlRejReason Y - Integer Enumeration indicating the reason
why their cancel was rejected.
0 = TooLateToCancel: Order has
already been canceled or filled.
1 = UnknownOrder: Order ID not
found in FIX engine.
Hong Kong office: 14 Shun Ho Tower 24-30 Ice House Street Central, Hong Kong
https://xhub.trade/