File: WebAPI/market_data_2.proto
Subscription to market data.
Prerequisites: client must have permission (allowed market data) to specified contract.
Note: If it is necessary to change subscription level client should send a new subscription request with the same contract ID but a new subscription level.
Limits:
1. Number of subscriptions cannot exceed 200 simultaneous subscriptions by default. Subscriptions on options strikes (puts and calls) of the same option maturity are considered as a single subscription within the limit.
Responses: MarketDataSubscriptionStatus.
Relates to: RealTimeMarketData.
Type: uint32
Description: Contract ID to subscribe.
Note: This is client’s responsibility to re-subscribe in the case symbol resolution update, e.g. contract rollover (change of the most active contract).
Source: metadata_2.ContractMetadata.contract_id.
Type: uint32
Description: Subscription request ID.
Note: Should be unique among currently processed requests.
Required: yes.
Type: uint32
Description: Subscription level.
Note: This field is associated with Level enum type. Result level will be available in MarketDataSubscriptionStatus.
Source: MarketDataSubscription.Level.
Type: bool
Description: Defines market values array in real-time market data snapshot.
Note: False or omitted means that snapshots will contain market values for most recent trading day only (if available). True means that snapshots may contain market values for several (up to 2) past trading days.
Type: bool
Description: Defines quotes array in real-time market data snapshot.
See: RealTimeMarketData.quotes.
Note: Subscription with include_past_quotes=True may take longer.
Type: bool
Description: Defines session market values array in real-time market data snapshot.
Note: False or omitted means that snapshots will not contain session market values. True means that snapshots may contain session market values for several sessions.
Type: bool
Description: Specifies that quotes and market values need to include yields.
Note: Result value will be available in MarketDataSubscriptionStatus. Re-subscription with the changed value of this parameter may lead to temporary disconnection of real-time market data (MarketDataSubscriptionStatus.StatusCode.STATUS_CODE_DISCONNECTED).
Type: bool
Description: Defines source contract quote price in real-time market data.
Note: scaled_source_price is provided only for best ask and best bid. Other quote types either have the same values as scaled_price for the contract or not supported. Flag is ignored (considered as False) if the contract does not have a source contract. Re-subscription with the changed value of this parameter may lead to temporary disconnection of real-time market data (MarketDataSubscriptionStatus.StatusCode.STATUS_CODE_DISCONNECTED).
include_requests_for_quotation
Type: bool
Description: Whether need to include RFQ in real-time market data.
Note: Result value will be available in MarketDataSubscriptionStatus.
Type: bool
Description: Specifies that quotes need to include trade attributes.
Type: bool
Description: Specifies to include market state in real-time market data.
Type: bool
Description: Specifies to include Off Market trade quotes in real-time market data.
Type: string
Description: Optional contributor ID for contributor specific data subscriptions.
See: metadata_2.ContributorMetadata.contributor_id.
Note: WebAPI selects contributor parameters according to the next algorithm:
1. See if contract has a list of contributors (metadata_2.ContractMetadata.contributor_parameters). If there are none then don’t use contributor ID for a subscription.
2. If there are contributors but contributor authorization is not required for contract’s exchange then don’t use contributor ID for a subscription.
3. If authorization is required then find an overlap between account and contract contributors.
a. If there is only one contributor then use it.
b. If there are no contributors client subscription fails.
c. If there are more than one and client doesn’t specify contributor ID, subscription fails with MarketDataSubscriptionStatus.StatusCode.STATUS_CODE_CONTRIBUTOR_REQUIRED.
See: metadata_2.ContributorMetadata.contributor_id.
Type: bool
Description: Specifies that quotes and market values need to include currency prices used for price conversion.
Note: Flag is ignored (considered as False) if the contract does not have a source contract. Re-subscription with the changed value of this parameter may lead to temporary disconnection of real-time market data (MarketDataSubscriptionStatus.StatusCode.STATUS_CODE_DISCONNECTED).
Type: uint32
Description: DOM data subscription type for level MarketDataSubscription.Level.LEVEL_TRADES_BBA_DOM or MarketDataSubscription.Level.LEVEL_TRADES_BBA_DETAILED_DOM.
Source: MarketDataSubscription.DomType.
Note: Default value is MarketDataSubscription.DomType.DOM_TYPE_COMBINED.
Type: bool
Description: Specifies whether to include scaled premium price added to quote price.
Description: Level of subscription.
•LEVEL_NONE = 0
Unsubscribe.
•LEVEL_SETTLEMENTS = 5
Get only settlement quotes.
Note: MarketValues will contain only settlements.
•LEVEL_END_OF_DAY = 6
Get only market values.
Note: Supported only for contracts with filled field ContractMetadata::end_of_day_delay. Array of quotes, requests for quotation, corrections, detailed DOM, market state in RealTimeMarketData message will be always empty. If current trading day is not yet available (see commentary to field ‘end_of_day_delay’ in message ContractMetadata), then MarketValues for today are provided the same way as if the trading day was just started: only required fields and yesterday prices are filled.
•LEVEL_TRADES = 1
Get trade and settlement with volumes (if volumes are known).
•LEVEL_TRADES_BBA = 2
Get trades and settlements with volumes (if volumes are known), best asks and best bids without volumes.
•LEVEL_TRADES_BBA_VOLUMES = 3
Get trades, settlements, best asks and best bids with volumes (if volumes are known).
•LEVEL_TRADES_BBA_DOM = 4
All price data including DOM (Implied and/or Combined, depending on dom_subscription_type and MarketDataSubscriptionStatus.actual_dom_subscription_type).
•LEVEL_TRADES_BBA_DETAILED_DOM = 7
LEVEL_TRADES_BBA_DOM + Order Details.
Note: Includes information for all orders (both implied and outright).
•DOM_TYPE_COMBINED = 0
Real-time data shall contain Combined DOM only: a sum of Outright DOM and Implied DOM. Implied DOM is based on spread orders, Outright DOM is based on outright orders.
•DOM_TYPE_IMPLIED = 1
Real-time data shall contain only Implied DOM.
•DOM_TYPE_IMPLIED_AND_COMBINED = 2
Real-time data shall contain both Combined and Implied DOM.