Subscribing to Streaming Data
The T4 FIX API provides (optional) subscriptions to streaming market data for all markets available in order routing. Market data is made available asynchronously and concurrently to order routing flow. The market data subscriptions are active during a FIX Session. They are initiated by Market Data Request messages (Tag 35=V). A Market Data Request is a general request for streaming of market data quotes on specific securities. Under the T4 FIX API, securities are defined by the Exchange, Contracts within an exchange and Markets for a specific contract. Exchanges are identified by a unique Exchange ID in Tag 207 (SecurityExchange). Contracts are characterized by its Contract ID in Tag 55 (Symbol). Markets are identified by a unique Market ID by Tag 48 (SecurityID).
Any time during a FIX Session, market data subscriptions can be requested for a specific market by specifying a Subscription Request Type (Tag 263=1). During the FIX session, the streaming market data (for any specific security) can also be unsubscribed (Tag 263=2).
A successful Market Data Request (for subscription) returns one or more Market Data messages containing one or more Market Data Entries. Currently, The T4 FIX API provides market updates with the MarketData Snapshot message (Tag 35=W) and the MarketData Incremental Refresh message (Tag 35=X). Market Data Snapshots carry multiple blocks of quote data delineated by Market Data Entries. Each Market Data Entry is a bid, an offer, a trade, settlement price of a security, the trading session high price, low price, or trade volume, open interest and low and high price limits. Market Data Entries usually have a price and a quantity (size) at a book level (for securities with market depth). For example, in an order book environment, requesting just the top of book would result in two active Market Data Entries; one for the best bid and one for the best offer. For a full book, the bid and offer sides may each have several Market Data Entries corresponding to multiple book levels. Market Data Incremental Refresh messages provide depth updates in an incremental fashion and are only applied to specific book levels as opposed to all levels of the entire depth book.
Market Data requests that cannot be honored are notified via the MarketData Request Reject message.
Subscription Types
The following Subscription Request Types control attributes, initiation and termination of streaming market data:
Data Throughput and Buffering Levels
The T4 FIX API offers several levels of data throughput. The market data subscriber can control the number of quotes and the throughput rate (received by a client application). The T4 FIX API buffers streaming market data flow and disseminates quotes at the throughput level requested by the API client. Smart Buffering is recommended.
The following T4 buffering levels are available:
Book Depth
The T4 FIX API Book Depth controls the number of book levels received for each update. Up to 10 book levels are available, depending on the security. The number of levels is requested with MarketDepth (Tag 264). Higher depth increases bandwidth usage. Level 1 is recommended for quote boards; Level 10 for full depth.
Matching Market Data Messages against Market Data Requests
Market Data messages can be matched (by the FIX API client) through either the (unique) SecurityID (Tag 48) or by the Request ID (MDReqID - Tag 262) of the Market Data Request that initiated the streaming. SecurityID (Tag 48) is the default identification mechanism. To request identification by MDReqID, the market's SecurityDesc (Tag 107) must be set to 262. If the client requests to identify by MDReqID, the SecurityID will not be included in the market data messages.
Message Dictionary
Tag | Field Name | Req'd | Comments |
---|---|---|---|
Standard Header | Y | MsgType = V | |
262 | MDReqID | Y | Must be unique. In order to unsubscribe, may pertain to the MDReqID of a previous (subscription) Market Data Request. |
263 | SubscriptionRequestType | Y | 0 = SNAPSHOT; 1 = SUBSCRIBE; 2 = UNSUBSCRIBE; 7 = SUBSCRIBE_INCREMENTAL |
264 | MarketDepth | Y | Requested Depth of market. TopOfBookOnly = 1; FullBook = 10 |
265 | MDUpdateType | N | Type of Market Data throughput. 2 = Slow Trade; 3 = Smart Trade; 4 = Slow Smart; 5 = Smart; 6 = Fast Smart; 7 = All; 8 = Fast Trade; 9 = Trade Only |
267 | NoMDEntryTypes | Y | Number of MDEntryType fields requested. |
269 | MDEntryType | Y | 0 = Bid; 1 = Offer; 2 = Implied Bid; 3 = Implied Offer; 4 = Last Trade; 6 = Settlement; 7 = Session High; 8 = Session Low; 9 = Session Open; K = Price High Limit; L = Price Low Limit; B = Trade Volume |
146 | NoRelatedSym | Y | Number of symbols requested. |
55 | Symbol | Y | T4 Contract ID. |
48 | SecurityID | Y | T4 Market ID. |
167 | SecurityType | Y | Futures=“FUT”, Options=“OPT”, Stock=“STK”, Synthetic=“SYN”, Binary Option=“BIN” |
207 | SecurityExchange | Y | T4 Exchange ID. |
201 | PutOrCall | N | For Options: 0 = Put; 1 = Call |
107 | SecurityDesc | N | Market Data Message Identification. Set to 262 for MDReqID matching. |
1070 | QuoteType | N | Obsolete. 1 = Ticks; 2 = Decimal |
Standard Trailer | Y |
Sample Messages
Subscribe to streaming data from a specific market
>> 10/10/2012 9:37:58 AM [FIXMARKETDATAREQUEST] 34=1891|49=T4Example|56=T4|52=20121010-14:37:58.720|262=md-10/10/2012 9:37:58 AM|263=1|264=10|265=5|1070=1|267=3|269=0|269=1|269=2|146=1|55=ES|48=CME_20121200_ESZ2|167=FUT|207=CME_Eq| [FIXMARKETDATAREQUEST] [MsgSeqNum] 34 = 1891 [SenderCompID] 49 = T4Example [TargetCompID] 56 = T4 [SendingTime] 52 = 20121010-14:37:58.720 [MDReqID] 262 = md-10/10/2012 9:37:58 AM [SubscriptionRequestType] 263 = 1 (SNAPSHOT_PLUS_UPDATES) [MarketDepth] 264 = 10 [MDUpdateType] 265 = 5 (SMART) [NoMDEntryTypes] 267 = 3 [MDEntryType] 269 = 0 (BID) [MDEntryType] 269 = 1 (OFFER) [MDEntryType] 269 = 2 (IMPLIED_BID) [NoRelatedSym] 146 = 1 [Symbol] 55 = ES [SecurityID] 48 = CME_20121200_ESZ2 [SecurityType] 167 = FUT (FUTURE) [SecurityExchange] 207 = CME_Eq
UnSubscribe from a currently streaming market
>> 10/10/2012 9:37:59 AM [FIXMARKETDATAREQUEST] 34=1892|49=T4Example|56=T4|52=20121010-14:37:59.765|262=md-10/10/2012 9:37:59 AM|263=2|264=10|265=5|1070=1|267=3|269=0|269=1|269=2|146=1|55=ES|48=CME_20121200_ESZ2|167=FUT|207=CME_Eq| [FIXMARKETDATAREQUEST] [MsgSeqNum] 34 = 1892 [SenderCompID] 49 = T4Example [TargetCompID] 56 = T4 [SendingTime] 52 = 20121010-14:37:59.765 [MDReqID] 262 = md-10/10/2012 9:37:59 AM [SubscriptionRequestType] 263 = 2 (DISABLE_PREVIOUS_SNAPSHOT_PLUS_UPDATE_REQUEST) [MarketDepth] 264 = 10 [MDUpdateType] 265 = 5 (SMART) [NoMDEntryTypes] 267 = 3 [MDEntryType] 269 = 0 (BID) [MDEntryType] 269 = 1 (OFFER) [MDEntryType] 269 = 2 (IMPLIED_BID) [NoRelatedSym] 146 = 1 [Symbol] 55 = ES [SecurityID] 48 = CME_20121200_ESZ2 [SecurityType] 167 = FUT (FUTURE) [SecurityExchange] 207 = CME_Eq