Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
faq:marketdata_request [2025/07/25 18:59] – created rob | faq:marketdata_request [2025/07/28 12:04] (current) – [Sample Messages] rob | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
- | ===== Logging out Traders ===== | + | **Subscribing to Streaming Data** |
- | Under an established | + | 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 |
- | A trader that has been successfully authenticated with a Trader Logon can be logged out by the Master User with a Trader Logout message. The FIX API responds to Trader Logouts with the Trader Logout Response message. | + | A Market Data Request specifies: |
+ | * **Exchange** (`207=SecurityExchange`) | ||
+ | * **Contract** (`55=Symbol`) | ||
+ | * **Market** (`48=SecurityID`) | ||
- | ===== Responding to Trader Logouts ===== | + | Subscription and unsubscription are handled via: |
+ | * `263=1` – Subscribe (Snapshot + Updates) | ||
+ | * `263=2` – Unsubscribe | ||
- | The Trader Logout Response message identifies the trader | + | Successful subscriptions return: |
+ | * **MarketData Snapshot** | ||
+ | * **MarketData Incremental Refresh** | ||
- | ^ Tag Name ^ Tag Number ^ Description ^ | + | Each Market Data Entry (e.g., bid, offer, trade, volume) may include price and quantity. For example: |
- | | UserName | 553 | T4 User | | + | * Top of book: 2 entries (bid + offer) |
- | | Text | 58 | T4 Description | + | * Full book: multiple entries per side |
- | A successful attempt to log out a trader is acknowledged with a Trader Logout Response message that contains a Success description in the Text tag (Tag 58). | + | Incremental Refresh provides only updated depth levels, improving bandwidth efficiency. |
- | Failure to logout a trader will result in a failed Trader Logout Response | + | Unsuccessful requests |
- | A failed Trader Logout does not result in a physical disconnection. The FIX Session continues with the participation | + | ===== Subscription Types ===== |
+ | |||
+ | * **Snapshot (263=0)** — Current state only. | ||
+ | * **Subscribe (263=1)** — Snapshot + Updates. | ||
+ | * **Unsubscribe (263=2)** — Cancel updates. | ||
+ | * **Subscribe Incremental (263=7)** — Snapshot + Incremental Refresh. | ||
+ | * **Chart Data (263=4,5)** — See below. | ||
+ | |||
+ | ===== Data Throughput / Buffering Levels ===== | ||
+ | |||
+ | Buffering level (Tag `265`) options: | ||
+ | |||
+ | ^ Value ^ Buffering Type ^ Description ^ | ||
+ | | 2 | SlowTrade | SlowSmart + individual trades | | ||
+ | | 3 | SmartTrade | Smart + individual trades | | ||
+ | | 4 | SlowSmart | ~1/sec update if changed | | ||
+ | | 5 | Smart | (Recommended) variable rate | | ||
+ | | 6 | FastSmart | More frequent updates | | ||
+ | | 7 | All | No buffering (high bandwidth) | | ||
+ | | 8 | FastTrade | FastSmart + trades | | ||
+ | | 9 | TradeOnly | Trades only (no depth) | | ||
+ | |||
+ | ===== Book Depth ===== | ||
+ | |||
+ | Requested via Tag `264` (MarketDepth): | ||
+ | * **1** — Top of book (Level 1) | ||
+ | * **10** — Full depth (up to 10 levels) | ||
+ | |||
+ | ===== Matching Market Data ===== | ||
+ | |||
+ | Data can be matched using: | ||
+ | * `48=SecurityID` (default) | ||
+ | * `262=MDReqID` if `107=262` is included | ||
+ | |||
+ | ===== Chart Data Requests ===== | ||
+ | |||
+ | Available | ||
+ | |||
+ | Tag `263` values for Chart Data: | ||
+ | * **4 = TIME_AND_SALES_DATA_BATCH** (multi-day + session) | ||
+ | * **5 = TIME_AND_SALES_CONTRACT** (single day, no session span) | ||
+ | |||
+ | Additional fields: | ||
+ | * `3200` = Start Date (UTCDateOnly) | ||
+ | * `3201` = End Date | ||
+ | * `3202`, `3203` = Session Time span (UTCTimeOnly) | ||
+ | * `3204` = ChartType (0=Tick, 1=Sec, 2=Min, etc.) | ||
+ | * `3205` = DataFormat (U, T, Z) | ||
===== Message Dictionary ===== | ===== Message Dictionary ===== | ||
- | ^ Tag ^ Field Name ^ Req'd ^ Comments | + | ^ Tag ^ Field Name ^ Req’d ^ Description |
- | | Standard Header | | Y | MsgType = UCJ | | + | | Standard Header | | Y | MsgType = V | |
- | | 49 | SenderCompID | + | | 262 | MDReqID |
- | | 56 | TargetCompID | + | | 263 | SubscriptionRequestType | Y | 0 = Snapshot, 1 = Subscribe, 2 = Unsubscribe, |
- | | Body | | Y | | | + | | 264 | MarketDepth |
- | | 553 | UserName | + | | 265 | MDUpdateType | N | Throughput mode | |
- | | 58 | Text | Y | Description of Trader Logout result | + | | 267 | NoMDEntryTypes |
- | | Standard Trailer | | Y | | | + | | 269 | MDEntryType | Y | 0=Bid, 1=Offer, 2=Trade, 4=LastTrade, |
+ | | 146 | NoRelatedSym | Y | Repeating Group | | ||
+ | | 55 | Symbol | Y | Contract Symbol | | ||
+ | | 48 | SecurityID | ||
+ | | 167 | SecurityType | ||
+ | | 207 | SecurityExchange | Y | Exchange ID | | ||
+ | | 107 | SecurityDesc | N | If 107=262, match by MDReqID | | ||
+ | | 1070 | QuoteType | N | 1 = Ticks, 2 = Decimal | | ||
+ | | 3200 | StartDate | N | UTCDateOnly (for chart) | | ||
+ | | 3201 | EndDate | N | UTCDateOnly (for chart) | | ||
+ | | 3202 | SessionStartTime | N | UTCTimeOnly | | ||
+ | | 3203 | SessionEndTime | N | UTCTimeOnly | | ||
+ | | 3204 | ChartType | N | 0=Tick, 1=Sec, 2=Min, 3=Hour, 4=Day | | ||
+ | | 3205 | DataFormat | N | U = Uncompressed, | ||
+ | | Standard Trailer | | Y | | | ||
===== Sample Messages ===== | ===== Sample Messages ===== | ||
- | ==== 1 - LOGIN (in): Login Request from T4 FIX API Client | + | **Subscribe to streaming data from a specific market** |
+ | |||
+ | < | ||
+ | >> 10/10/2012 9:37:58 AM | ||
+ | [FIXMARKETDATAREQUEST] | ||
+ | [MsgSeqNum] 34 = 1891 | ||
+ | [SenderCompID] 49 = T4Example | ||
+ | [TargetCompID] 56 = T4 | ||
+ | [SendingTime] 52 = 20121010-14: | ||
+ | [MDReqID] 262 = md-10/ | ||
+ | [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** | ||
- | < | + | < |
- | ==== 2 - LOGIN (out): Successful Login Response from T4 FIX API ==== | + | >> 10/10/2012 9:37:59 AM |
+ | [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 | ||
+ | </ | ||
- | < | + | **Chart Data Request (Uncompressed |
- | ==== 3 - TRADERLOGIN (in): Trader Logon Request from T4 FIX API Client ==== | + | |
- | < | + | < |
- | ==== 4 - TRADERLOGINRESPONSE | + | >> 6/26/2013 6:40:01 PM |
+ | [FIXMARKETDATAREQUEST] | ||
+ | [MsgSeqNum] 34 = 3 | ||
+ | [SenderCompID] 49 = T4Example | ||
+ | [TargetCompID] 56 = T4 | ||
+ | [SendingTime] 52 = 20130626-23:40:01.294 | ||
+ | [MDReqID] 262 = mdc-6/26/2013 6:40:01 PM | ||
+ | [SubscriptionRequestType] 263 = 4 (TIMEANDSALES_DATA_BATCH) | ||
+ | [MarketDepth] 264 = 1 | ||
+ | [MDUpdateType] 265 = 5 (SMART) | ||
+ | [NoMDEntryTypes] 267 = 0 | ||
+ | [NoRelatedSym] 146 = 1 | ||
+ | [Symbol] 55 = ZC | ||
+ | [SecurityID] 48 = LVCME_20121200_ZCZ2 | ||
+ | [SecurityType] 167 = FUT (FUTURE) | ||
+ | [SecurityExchange] 207 = LVCME_C | ||
+ | [TradeDateStart] 3200 = 20121212 | ||
+ | [TradeDateEnd] 3201 = 20121213 | ||
+ | [SessionStartTime] 3202 = 09:00:00 | ||
+ | [SessionEndTime] 3203 = 09:10:00 | ||
+ | [ChartType] 3204 = 2 (MINUTE) | ||
+ | [DataFormat] 3205 = U (UNCOMPRESSED) | ||
- | < | + | </ |
- | ==== 5 - TRADERLOGOUT (in): Trader Logout Request ==== | + | |
- | < | + | **Chart Data Response** |
- | ==== 6 - TRADERLOGOUTRESPONSE (out): Successful Trader Logout | + | |
- | < | + | < |
- | ==== 7 - LOGOUT | + | << 06/26/2013 06: |
+ | [FIXMARKETDATASNAPSHOT] | ||
+ | [MsgSeqNum] 34 = 3 | ||
+ | [SenderCompID] 49 = T4 | ||
+ | [TargetCompID] 56 = T4Example | ||
+ | [SenderSubID] 50 = T4FIX | ||
+ | [SendingTime] 52 = 20130626-23: | ||
+ | [MDReqID] 262 = mdc-6/ | ||
+ | [Symbol] 55 = ZC | ||
+ | [SecurityID] 48 = LVCME_20121200_ZCZ2 | ||
+ | [SecurityExchange] 207 = LVCME_C | ||
+ | [SecurityStatus] 965 = 16 (SUCCESS) | ||
+ | [TradeDateStart] 3200 = 20121212 | ||
+ | [TradeDateEnd] 3201 = 20121213 | ||
+ | [SessionStartTime] 3202 = 09:00:00.000 | ||
+ | [SessionEndTime] 3203 = 09: | ||
+ | [ChartType] 3204 = 2 (MINUTE) | ||
+ | [DataFormat] 3205 = 2 (T4BIN) | ||
+ | [NoMDEntries] 268 = 2 | ||
+ | [MDEntryType] 269 = Y (CHART_DATA_BATCH) | ||
+ | [TradeDate] 75 = 20121213 | ||
+ | [NoChartDatas] 3210 = 15 | ||
+ | [Change] 3212 = 6 (TRADE_DATE) | ||
+ | [TradeDate] 3211 = 20121213 | ||
+ | [Change] 3212 = 3 (MARKET_MODE) | ||
+ | [MarketModeTime] 3213 = 20121212-22: | ||
+ | [MarketMode] 3214 = 6 (SUSPENDED) | ||
+ | [Change] 3212 = 3 (MARKET_MODE) | ||
+ | [MarketModeTime] 3213 = 20121212-23: | ||
+ | [MarketMode] 3214 = 2 (OPEN) | ||
+ | [Change] 3212 = 0 (NONE) | ||
+ | [MinPriceIncrement] 3280 = 25 | ||
+ | [Decimals] 3281 = 0 | ||
+ | [PriceCode] 3208 = MC | ||
+ | [TickValue] 3209 = 12.5 | ||
+ | [Change] 3212 = 11 (CLEARED_VOLUME) | ||
+ | [ClearedVolumeTime] 3225 = 20121213-07: | ||
+ | [ClearedVolume] 3226 = 2342 | ||
+ | [Change] 3212 = 12 (OPEN_INTEREST) | ||
+ | [OpenInterestTime] 3222 = 20121213-07: | ||
+ | [OpenInterest] 3223 = 2445 | ||
+ | [Change] 3212 = 12 (OPEN_INTEREST) | ||
+ | [OpenInterestTime] 3222 = 20121213-14: | ||
+ | [OpenInterest] 3223 = 2147 | ||
+ | [Change] 3212 = 5 (TRADE_BAR) | ||
+ | [BarStartTime] 3254 = 20121213-15: | ||
+ | [BarCloseTime] 3255 = 20121213-15: | ||
+ | [BarOpenPrice] 3256 = 72100 | ||
+ | [BarHighPrice] 3257 = 72100 | ||
+ | [BarLowPrice] 3258 = 72100 | ||
+ | [BarClosePrice] 3259 = 72100 | ||
+ | [BarVolume] 3260 = 1 | ||
+ | [BarBidVolume] 3261 = 1 | ||
+ | [BarOfferVolume] 3262 = 0 | ||
+ | [BarTradeCount] 3263 = 1 | ||
+ | [BarTradesAtBid] 3264 = 1 | ||
+ | [BarTradesAtOffer] 3265 = 0 | ||
+ | [Change] 3212 = 3 (MARKET_MODE) | ||
+ | [MarketModeTime] 3213 = 20121213-20: | ||
+ | [MarketMode] 3214 = 7 (HALTED) | ||
+ | [Change] 3212 = 4 (SETTLEMENT) | ||
+ | [SettlementTime] 3216 = 20121213-20: | ||
+ | [Settlement] 3217 = 71225 | ||
+ | [Change] 3212 = 10 (HELD_SETTLEMENT) | ||
+ | [HeldSettlementTime] 3219 = 20121213-20: | ||
+ | [HeldSettlement] 3220 = 71225 | ||
+ | [Change] 3212 = 3 (MARKET_MODE) | ||
+ | [MarketModeTime] 3213 = 20121213-20: | ||
+ | [MarketMode] 3214 = 1 (PRE_OPEN) | ||
+ | [Change] 3212 = 3 (MARKET_MODE) | ||
+ | [MarketModeTime] 3213 = 20121213-22: | ||
+ | [MarketMode] 3214 = 5 (CLOSED) | ||
+ | [Change] 3212 = 3 (MARKET_MODE) | ||
+ | [MarketModeTime] 3213 = 20121213-22: | ||
+ | [MarketMode] 3214 = 1 (PRE_OPEN) | ||
+ | [Change] 3212 = 5 (TRADE_BAR) | ||
+ | [BarStartTime] 3254 = 20121213-15: | ||
+ | [BarCloseTime] 3255 = 20121213-15: | ||
+ | [BarOpenPrice] 3256 = 72175 | ||
+ | [BarHighPrice] 3257 = 72175 | ||
+ | [BarLowPrice] 3258 = 72175 | ||
+ | [BarClosePrice] 3259 = 72175 | ||
+ | [BarVolume] 3260 = 4 | ||
+ | [BarBidVolume] 3261 = 0 | ||
+ | [BarOfferVolume] 3262 = 4 | ||
+ | [BarTradeCount] 3263 = 4 | ||
+ | [BarTradesAtBid] 3264 = 0 | ||
+ | [BarTradesAtOffer] 3265 = 4 | ||
+ | [MDEntryType] 269 = Y (CHART_DATA_BATCH) | ||
+ | [TradeDate] 75 = 20121212 | ||
+ | [NoChartDatas] 3210 = 22 | ||
+ | [Change] 3212 = 6 (TRADE_DATE) | ||
+ | [TradeDate] 3211 = 20121212 | ||
+ | [Change] 3212 = 3 (MARKET_MODE) | ||
+ | [MarketModeTime] 3213 = 20121211-22: | ||
+ | [MarketMode] 3214 = 6 (SUSPENDED) | ||
+ | [Change] 3212 = 3 (MARKET_MODE) | ||
+ | [MarketModeTime] 3213 = 20121211-23: | ||
+ | [MarketMode] 3214 = 2 (OPEN) | ||
+ | [Change] 3212 = 0 (NONE) | ||
+ | [MinPriceIncrement] 3280 = 25 | ||
+ | [Decimals] 3281 = 0 | ||
+ | [PriceCode] 3208 = MC | ||
+ | [TickValue] 3209 = 12.5 | ||
+ | [Change] 3212 = 11 (CLEARED_VOLUME) | ||
+ | [ClearedVolumeTime] 3225 = 20121212-07: | ||
+ | [ClearedVolume] 3226 = 3072 | ||
+ | [Change] 3212 = 12 (OPEN_INTEREST) | ||
+ | [OpenInterestTime] 3222 = 20121212-07: | ||
+ | [OpenInterest] 3223 = 3912 | ||
+ | [Change] 3212 = 3 (MARKET_MODE) | ||
+ | [MarketModeTime] 3213 = 20121212-12: | ||
+ | [MarketMode] 3214 = 0 (UNDEFINED) | ||
+ | [Change] 3212 = 3 (MARKET_MODE) | ||
+ | [MarketModeTime] 3213 = 20121212-12: | ||
+ | [MarketMode] 3214 = 2 (OPEN) | ||
+ | [Change] 3212 = 3 (MARKET_MODE) | ||
+ | [MarketModeTime] 3213 = 20121212-14: | ||
+ | [MarketMode] 3214 = 0 (UNDEFINED) | ||
+ | [Change] 3212 = 3 (MARKET_MODE) | ||
+ | [MarketModeTime] 3213 = 20121212-14: | ||
+ | [MarketMode] 3214 = 2 (OPEN) | ||
+ | [Change] 3212 = 5 (TRADE_BAR) | ||
+ | [BarStartTime] 3254 = 20121212-15: | ||
+ | [BarCloseTime] 3255 = 20121212-15: | ||
+ | [BarOpenPrice] 3256 = 72375 | ||
+ | [BarHighPrice] 3257 = 72400 | ||
+ | [BarLowPrice] 3258 = 72375 | ||
+ | [BarClosePrice] 3259 = 72400 | ||
+ | [BarVolume] 3260 = 4 | ||
+ | [BarBidVolume] 3261 = 0 | ||
+ | [BarOfferVolume] 3262 = 4 | ||
+ | [BarTradeCount] 3263 = 4 | ||
+ | [BarTradesAtBid] 3264 = 0 | ||
+ | [BarTradesAtOffer] 3265 = 4 | ||
+ | [Change] 3212 = 5 (TRADE_BAR) | ||
+ | [BarStartTime] 3254 = 20121212-15: | ||
+ | [BarCloseTime] 3255 = 20121212-15: | ||
+ | [BarOpenPrice] 3256 = 72375 | ||
+ | [BarHighPrice] 3257 = 72375 | ||
+ | [BarLowPrice] 3258 = 72375 | ||
+ | [BarClosePrice] 3259 = 72375 | ||
+ | [BarVolume] 3260 = 32 | ||
+ | [BarBidVolume] 3261 = 0 | ||
+ | [BarOfferVolume] 3262 = 32 | ||
+ | [BarTradeCount] 3263 = 25 | ||
+ | [BarTradesAtBid] 3264 = 0 | ||
+ | [BarTradesAtOffer] 3265 = 25 | ||
+ | [Change] 3212 = 5 (TRADE_BAR) | ||
+ | [BarStartTime] 3254 = 20121212-15: | ||
+ | [BarCloseTime] 3255 = 20121212-15: | ||
+ | [BarOpenPrice] 3256 = 72400 | ||
+ | [BarHighPrice] 3257 = 72425 | ||
+ | [BarLowPrice] 3258 = 72400 | ||
+ | [BarClosePrice] 3259 = 72425 | ||
+ | [BarVolume] 3260 = 2 | ||
+ | [BarBidVolume] 3261 = 0 | ||
+ | [BarOfferVolume] 3262 = 2 | ||
+ | [BarTradeCount] 3263 = 2 | ||
+ | [BarTradesAtBid] 3264 = 0 | ||
+ | [BarTradesAtOffer] 3265 = 2 | ||
+ | [Change] 3212 = 3 (MARKET_MODE) | ||
+ | [MarketModeTime] 3213 = 20121212-15: | ||
+ | [MarketMode] 3214 = 0 (UNDEFINED) | ||
+ | [Change] 3212 = 3 (MARKET_MODE) | ||
+ | [MarketModeTime] 3213 = 20121212-15: | ||
+ | [MarketMode] 3214 = 2 (OPEN) | ||
+ | [Change] 3212 = 3 (MARKET_MODE) | ||
+ | [MarketModeTime] 3213 = 20121212-20: | ||
+ | [MarketMode] 3214 = 7 (HALTED) | ||
+ | [Change] 3212 = 4 (SETTLEMENT) | ||
+ | [SettlementTime] 3216 = 20121212-20: | ||
+ | [Settlement] 3217 = 72100 | ||
+ | [Change] 3212 = 10 (HELD_SETTLEMENT) | ||
+ | [HeldSettlementTime] 3219 = 20121212-20:15:05.373 | ||
+ | [HeldSettlement] 3220 = 72100 | ||
+ | [Change] 3212 = 3 (MARKET_MODE) | ||
+ | [MarketModeTime] 3213 = 20121212-20: | ||
+ | [MarketMode] 3214 = 1 (PRE_OPEN) | ||
+ | [Change] 3212 = 3 (MARKET_MODE) | ||
+ | [MarketModeTime] 3213 = 20121212-22: | ||
+ | [MarketMode] 3214 = 5 (CLOSED) | ||
+ | [Change] 3212 = 3 (MARKET_MODE) | ||
+ | [MarketModeTime] 3213 = 20121212-22: | ||
+ | [MarketMode] 3214 = 1 (PRE_OPEN) | ||
+ | [Change] 3212 = 5 (TRADE_BAR) | ||
+ | [BarStartTime] 3254 = 20121212-15: | ||
+ | [BarCloseTime] 3255 = 20121212-15: | ||
+ | [BarOpenPrice] 3256 = 72425 | ||
+ | [BarHighPrice] 3257 = 72425 | ||
+ | [BarLowPrice] 3258 = 72425 | ||
+ | [BarClosePrice] 3259 = 72425 | ||
+ | [BarVolume] 3260 = 10 | ||
+ | [BarBidVolume] 3261 = 10 | ||
+ | [BarOfferVolume] 3262 = 0 | ||
+ | [BarTradeCount] 3263 = 6 | ||
+ | [BarTradesAtBid] 3264 = 6 | ||
+ | [BarTradesAtOffer] 3265 = 0 | ||
- | < | + | </ |
- | ==== 8 - LOGOUT (out): Successful Logout Response ==== | + | |
- | < |