0% found this document useful (0 votes)
111 views24 pages

Xhub Taker Fix API Specs

The document describes the FIX API specifications for connecting and interacting with the xHUB trading platform. It outlines the connectivity and authentication process, including logon and heartbeat messages. It also describes the types of messages supported, such as quotes, orders, rejects, and logouts. Clients must send periodic heartbeats to maintain the connection and subscribe to market data using MarketDataRequest messages.

Uploaded by

Awanish Rajan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
111 views24 pages

Xhub Taker Fix API Specs

The document describes the FIX API specifications for connecting and interacting with the xHUB trading platform. It outlines the connectivity and authentication process, including logon and heartbeat messages. It also describes the types of messages supported, such as quotes, orders, rejects, and logouts. Clients must send periodic heartbeats to maintain the connection and subscribe to market data using MarketDataRequest messages.

Uploaded by

Awanish Rajan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

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.

Note: S​ essions that do not return a heartbeat may be disconnected.

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.

49 SenderCompID Y - String The SenderCompID supplied to


the client by xHUB.

52 Timestamp Y - String When the message was sent, in


UTC time. Include milliseconds.
56 TargetCompID Y - String The TargetCompID supplied to
the client by xHUB.
115 OnBehalfOfCompID N - String Broker / User coordinated client
ID. This can be used to assign
specific trades to different
accounts on Liquidity Hub.

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.

141 ResetSeqNumFlag C - Boolea Forces automatic reset of


n sequence # for both sides.
Must be set to Y for quoting
sessions.

554 MsgSeqNum Y - Integer The password supplied to the


client by the broker.

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.

263 SubscriptionReq Y - INT Request type of enumeration


uest
264 Market Depth Y - INT The depth of market (number of price
layers) to be quoted for the symbols.

265 MDUPDateType Y 0 INT Must be set to 0 (Full Refresh). All layers will
be updated in each MarketDataSnapshot.

267 NoMDETryTypes Y - INT Type (side) of quote requested.


0 = Bid
1 = Offer

>269 MDEntryTypes Y - INT Number of instrument (55) requested.

146 NoRelatedSym Y - INT Number of instrument Symbols (55)


requested.

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.

281 MDReqRejReason N - INT An enumerated reason for the rejection


of the MarketDataRequest.

58 Text N - String Additional reason for the rejection, if


available.

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

->271 MDEntrySize N - Size The quantity (tradable volume) of


the market data entry.
->282 MDEntryOriginator N - String The originator of the quote

->299 QuoteEntryID N - String UniqueID for Quote

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

295 NoQuoteEntri N - Strin Only sent on Cancel Symbols


es g
>55 Symbol N - Strin Symbol (in CCY1CCY2 Format for
g FX)

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​:

The client requests a trade by sending a NewOrderSingleMessage.


xHUB FIX API responds immediately with an Execution Report (35=8) with an ExecType(150) of
PendingNew (A).
An order rejected due to credit or other failures will receive an ExecType Rejected (8).
An order partially filled sends its Execution Report (35=8) as ExecType PartiallyFilled (1).
An order completely filled sends its Execution Report (35=8) with ExecType Fill (2).
An order that times out or is canceled by the user sends its ExecutionReport with ExecType
Canceled (4).
● The CumQty (14)field in the Canceled report reflects any partial fills that occurred
before the canceled order.
If a client wishes to cancel the processing of a trade, a FIX Order Cancel Message can be sent.
If the order cannot be canceled, an OrderCancelReject (35=9)message will be sent in response.
If a client wishes to cancel to processing of a trade, a FIX Order Cancel Message can be sent. If
the order cannot be canceled, an OrderCancelReject (35=9) message will be sent in response.
Alternatively, the xHUB FIX API returns an Execution Report (35=8) with ExecType Canceled (4)
once the order completes.
Filled quantities are demarcated.

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 ExecutionReport​ExecType​ = 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.

Limit Only makes 1 Attempts to fill Only makes 1 pass to fill


pass to fill the the order until the order.
order. market timeout Must match a quote
value is whose price is as good or
reached. better than requested
Must match a price.
quote whose
price is as good
or better than
requested
price.

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.

50 SenderSubID N - String Broker / User coordinated


client group identifier. For
retails systems, should be a
unique identifier for the
underlying trade group.

11 CloRdID Y - String An ID for the trade. Must be


universally unique across all
prior trading sessions.

21 HandIlnst Y - Integer This field is ignored. Execution


is always treated as if supplied
value was 1 = Automated
execution order without broker
intervention.

55 Symbol Y - String Instrument symbol


(use CCY1CCY2 format)

54 Side Y - Integer The (buy or sell) of the


request
1 = Buy

Hong Kong office: 14 Shun Ho Tower 24-30 Ice House Street Central, Hong Kong
https://xhub.trade/
FIX API Specs
2 = Sell

38 OrderQty Y - Qty Order amount (for FX orders,


this is the CCY1 amount)

40 OrdType Y - Char Enumeration for the Type of


Order.
1 = Market
2 = Limit
D = Previously Quoted

44 Price Y/N - Price The price for LIMIT orders, or


reference price for Market
orders.
Required for LIMIT orders.
Ignored for MARKET orders.

58 Text N - Price User comment field.


59 TimeInForce Y - Integer Enumeration of order
duration.
1 = Good 'til Canceled (GTC)
3 = Immediate or Cancel (IOC)

60 Transact Y - Time Time of Order Creation in UTC


format.

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.

17 ExecID Y - String A unique ID assigned to the


specific Execution Report by
xHUB.
ExecIDs only guarantee to be
unique within a single session, and
only for the duration of that
session's connection.
IDs may repeat after a session
reconnects, and IDs are not
guaranteed to be unique across
multiple simultaneously
connected sessions.

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)

150 ExecType Y - Integer The enumerated type of


ExecutionReport:
A = Pending New (Received)
4 = Canceled (Canceled. Can have
fills but is not a complete fill)
8 = Rejected (Rejected, no fills)
F = Trade (this report indicates a
full or notification of partial filled
volume)

55 Symbol Y - String The instrument symbol from the


original order request.
54 Side Y - Integer The side (by or sell) of the original
request.
1 = Buy
2 = Sell

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.

44 Price N - Price The original requested price for the


order.
59 TimeInForce Y - Integer Enumeration of Order Duration
for the original request.
1 = GoodTilCanceled (GTC)
2 = Immediate or Cancel (IOC)
4 = FIll Or Kill (FOK)

31 LastPx N - Price If ExecType is Trade, this will be set


to the price of the fill.
32 LastQty N - Qty If ExecType is Trade, this will be set
to the quantity bought or sold
151 LeavesQty Y - Qty The remaining quantity to fill from
the original requested amount.

14 CumQty Y - Qty The total quantity filled for original


request, including this fill.

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.

64 SettlDate N - Date If ExecType is Trade, this will be set


to the UTC Settlement Date for the
fill. In YYYYMMDD format.

75 TradeDate N - Date If ExecType is trade, this will be set


to the UTC Trade Date for the fill in
YYYMMDD format.
103 OrderRejReas N - Integer The reason the order was rejected,
on if ExecType is Rejected.
58 Text N - String If ExecType is Rejected or Canceled,
and the reason is known. This will
be set to a text explanation of the
reason.
60 TransactTime N - Date Time of the original order creation
in UTC Format. Not sent when
ExecType​ is ​Pending New​.

382 NoContraBro N > Integer Number of ​ContraBroker


kers 0 repeating instances to follow.
If specified, must be > 0.

=> 375 ContraBroker C - String Name of the underlying trade


counterparty.
Required if No ContraBrokers > 0,
in which case it must be the first
field in the repeating group.

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

54 Side Y - Integer The side (buy or sell) of the request


1 = Buy
2 = Sell

60 TransactTim Y - Date Time this order request was initiated / released by


e the trader or trading system.

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.

434 CxlRejResponseTo Y - Integer Enumeration indicating the type of


request this reject is in response to.
60 TransactTime Y - Date The time the last action on the order
was transacted.

Hong Kong office: 14 Shun Ho Tower 24-30 Ice House Street Central, Hong Kong
https://xhub.trade/

You might also like