Message: ContractMetadata

File: WebAPI/metadata_2.proto

Description

Contract metadata. Client must have a subscription on ContractMetadata updates if its fields are used (e.g., its correct_price_scale field when processing RealTimeMarketData). It can be done e.g., via ContractMetadataRequest.

Used in

ContractMetadataReport, InstrumentDefinitionReport, InstrumentGroupItem, OrderStatus, PositionStatus, StrategyDefinitionReport, SymbolResolutionReport, Symbol

Fields

contract_id

Type: uint32

Description: Server assigned ID for a contract, it is not the same across sessions.

contract_symbol

Type: string

Description: Full contract symbol in CQG dialect.

correct_price_scale

Type: double

Description: Scale to convert prices from this protocol to correct prices (correctPrice = price * correctPriceScale).

display_price_scale

Type: uint32

Description: Display Price Scale is a number that defines conversion of float correct price to a ‘native’ integer display format and back. Below is the table of possible scale values.

Scale

Name

Description

0

One

Don’t scale

1

TenMinusOne

Divide by 10

2

TenMinusTwo

Divide by 100

3

TenMinusThree

Divide by 1000

4

TenMinusFour

Divide by 10000

5

TenMinusFive

Divide by 100000

6

TenMinusSix

Divide by 1000000

7

TenMinusSeven

Divide by 10000000

8

TenMinusEight

Divide by 100000000

9

TenMinusNine

Divide by 1000000000

10

TenMinusTen

Divide by 10^10

11

TenMinusEleven

Divide by 10^11

12

TenMinusTwelve

Divide by 10^12

13

TenMinusThirteen

Divide by 10^13

14

TenMinusFourteen

Divide by 10^14

15

TenMinusFifteen

Divide by 10^15

101

Halves

Divide by 2

102

Fourths

Divide by 4

103

Eighths

Divide by 8

104

Sixteenths

Divide by 16

105

ThirtySeconds

Divide by 32

106

SixtyFourths

Divide by 64

107

OneHundredTwentyEighths

Divide by 128

108

TwoHundredFiftySixths

Divide by 256

109

FiveHundredTwelfths

Divide by 512

110

OneThousandTwentyFourths

Divide by 1024

201

HalfThirtySeconds

Similar to 64ths

202

QuarterThirtySeconds

Similar to 128ths

203

EighthThirtySeconds

Similar to 256ths

204

HalfSixtyFourths

Similar to 128ths

205

QuarterSixtyFourths

Similar to 256ths

206

SixteenthThirtySeconds

Similar to 512ths

description

Type: string

Description: Contract description in CQG dialect.

extended_description (deprecated)

Type: string

Description: Use description instead.

title

Type: string

Description: Contract display name in CQG dialect.

dialect_id

Type: string

Description: Identifies the dialect applied to dialect_* fields. If set to “0” (CQG dialect), dialect_* fields are not populated.

dialect_contract_symbol

Type: string

Description: Full contract symbol in the dialect.

Can be empty string. E.g., if ContractMetadata.dialect_id is “0” (which means default, CQG dialect) or no available dialect metadata. Use ‘contract_symbol’ in this case.

dialect_description

Type: string

Description: Contract description in the dialect.

Can be empty string. E.g., if ContractMetadata.dialect_id is “0” (which means default, CQG dialect) or no available dialect metadata. Use ‘description’ in this case.

dialect_title

Type: string

Description: Contract display name in the dialect.

Can be empty string. E.g., if ContractMetadata.dialect_id is “0” (which means default, CQG dialect) or no available dialect metadata. Use ‘title’ in this case.

tick_size

Type: double

Description: Size of a single market tick in correct price format.

currency

Type: string

Description: Contract currency code (ISO-4217-based). Note that cryptocurrencies use codes that are ISO-4217-style, though usually not actual ISO codes (e.g., can be longer than 3 characters). Empty string if not applicable (e.g., for indexes).

tick_value

Type: double

Description: Contract tick money value in the contract’s currency. Zero if not applicable (e.g., for indexes).

cfi_code

Type: string

Description: CFI code (Classification of Financial Instruments, ISO 10962).

is_most_active

Type: bool

Description: True if this contract is the most active one for derivatives.

last_trading_date

Type: sint64

Description: Contract trading date for derivatives (local exchange date in time format, use date part only).

first_notice_date

Type: sint64

Description: Contract first notice date (local exchange date in time format, use date part only).

underlying_contract_symbol

Type: string

Description: Underlying contract symbol (e.g., for options and equities).

margin_style

Type: uint32

Description: This field is associated with MarginStyle enum type.

instrument_group_name

Type: string

Description: Name of a group of contracts that share the same properties (e.g., commodity name for futures and options). The name is always provided in CQG dialect.

dialect_instrument_group_name

Type: string

Description: Dialect name of a group of contracts that share the same properties (e.g. commodity name for futures and options). Note that this field can be empty even if ContractMetadata.dialect_id field is set.

session_info_id

Type: sint32

Description: ID of a session information this contract is related to. The field is set to -1 if session information is not available.

mic

Type: string

Description: Market segment MIC (ISO 10383) of the contract (if available), e.g., ‘GLBX’.

mic_description

Type: string

Description: Market segment MIC description (ISO 10383) of the contract (if available), e.g., ‘CME GLOBEX’.

market_data_delay

Type: sint64

Description: If a user has access to delayed data of the contract then this parameter is set to the delay value in milliseconds.

end_of_day_delay

Type: sint64

Description: If user is not allowed to receive quotes then End of Day (EOD) data for this contract can be allowed. In case of real-time market data subscriptions only level LEVEL_END_OF_DAY is supported. In case of time bar requests only Daily (or larger) bars are supported.

Note: Data for current and previous trading days are available only if corresponding trading day was closed |end_of_day_delay| milliseconds ago.

short_instrument_group_name

Type: string

Description: Instrument group name without the prefix.

instrument_group_description

Type: string

Description: Description of the instrument group.

tick_sizes_by_price

Type: TickSizeByPrice

Description: Variable tick size by contract price (if available for the contract). If variable tick sizes by contract price are available, tick_size and tick_value specify the minimal tick size and value among these.

strike

Type: sint32

Description: Option strike display value.

strike_price

Type: double

Description: Option strike price value (directly in correct format).

strike_price_scale

Type: uint32

Description: Scale which can be used for strike_price formatting. See: display_price_scale comment for possible values.

country_code

Type: string

Description: Two-letter exchange country code (ISO 3166-1 alpha 2).

strategy_definition

Type: strategy_definition_2.StrategyDefinition

Description: Strategy definition if the contract is of a synthetic or a user defined strategy.

contract_size

Type: string

Description: The deliverable quantity of commodities or financial instruments underlying contract. E.g. “1,000 U.S. Barrels (42,000) Gallons”, “125,000 Euro”

position_tracking

Type: uint32

Description: Setting which regulates how to calculate contract open positions. This field is associated with PositionTrackingType enum type. POSITION_TRACKING_TYPE_NET_POSITION, if not set.

speculation_type_required

Type: bool

Default: false

Description: Setting which requires whether every contract order has to specify SpeculationType instruction or not.

maturity_month_year

Type: string

Description: Month letter and 2-digit year identifying the maturity month of the contract (if applicable). Doesn’t depend on dialect. Month and corresponding letter:

      January F

      February G

      March H

      April J

      May K

      June M

      July N

      August Q

      September U

      October V

      November X

      December Z

maturity_date

Type: sint64

Description: Contract’s maturity date (e.g., for daily futures, when maturity_month_year is not enough). (local exchange date in time format, use date part only).

price_display_mode

Type: PriceDisplayMode

Description: Recommended display mode for prices. See the PriceDisplayMode description.

foreign_currency

Type: string

Description: Currency code (ISO-4217-based). For forex contracts only. Specifies the currency bought or sold. Note that cryptocurrencies use codes that are ISO-4217-style, though usually not actual ISO codes (e.g., can be longer than 3 characters).

volume_scale (deprecated)

Type: cqg.Decimal

Description: Specifies a volume unit of a contract, similar to correct_price_scale. If a message contains a volume as uint64 (like Quote or TimeBar), its correct volume is calculated as: correct_volume = Quote.volume * volume_scale. If a message contains a volume as cqg.Decimal, it is the correct volume. If a contract has no fixed scale, this value is 1, and only cqg.Decimal volumes must be used.

volume_display_exponent

Type: sint32

Default: 0

Description: Specifies the recommended representation of volumes to users:

      negative numbers - ‘-N’ - mean that N decimal digits should be shown.

      positive numbers - ‘N’ - mean that N digits can be hidden behind a unit prefix (or unit symbol), e.g., if N = 3, volumes can be shown as “12k”.

trade_size_increment

Type: cqg.Decimal

Description: Trade volume is required to be a multiple of trade_size_increment.

has_inverted_price_ladder

Type: bool

Description: True if DOM views should be inverted: low numbers are at the top, high numbers are at the bottom. This field is usually set for fixed income contracts with “prices are yields” model.

dom_ladder_compression_ratio

Type: uint32

Description: The denominator (numerator is 1) of the DOM ladder compression ratio to compress the ladder to eliminate all the extra/non-quoting values.

expect_off_tick_prices

Type: bool

Default: false

Description: Whether to expect that prices may appear not on the nominal tick prices (not products of any tick_size: ordinal, variable, etc.) to changes DOM UI behavior. Format such prices according to display_price_scale rule.

has_exchange_volume

Type: bool

Default: true

Description: Specifies whether exchange provides volume data or not.

has_yields

Type: bool

Description: True if the contract supports yields and you can request them with MarketDataSubscription.include_yields.

Note: If the contract has “prices are yields” model this field is false and yields are provided through the price field.

isin

Type: string

Description: The ISIN code acts an identifier for the securities. And as such is the only common denominator securities identification number that is universally recognized.

initial_margin

Type: double

Description: Reference value for initial margin, expressed as money value in the contract’s currency. Note the value is informational only, not updated real-time, and does not consider the account’s portfolio or risk settings/parameters.

maintenance_margin

Type: double

Description: Reference value for maintenance margin (required to maintain 1 lot position in this contract), expressed as money value in the contract’s currency. Note the value is informational only, not updated real-time, and does not consider the account’s portfolio or risk settings/parameters.

contract_size_in_units

Type: cqg.Decimal

Description: Contract size in the number of units (where defined). Unit is defined by contract_size_unit filed.

contract_size_unit

Type: shared_1.Text

Description: Unit label for the contract size.

last_delivery_date

Type: sint64

Description: Contract last delivery date (local exchange date in time format, use date part only).

contributor_parameters

Type: metadata_admin_2.ContributorParameters

Description: Optional custom contract parameters per associated OTC contributor (if any).

listing_period_type

Type: uint32

Description: Type of listing period. This field is associated with PeriodType enum type.

listing_period_value

Type: uint32

Description: Value of listing period in listing_period_type units.

symbol_id

Type: string

Description: ID of the symbol the contract represents (Symbol.id attribute).

deleted

Type: bool

Default: false

Description: If contract metadata is “deleted”, corresponding contract id can’t be referred to in requests anymore (this happens e.g., when published contract gets unpublished).

contributor_group_id

Type: sint32

Description: ID used for ContributorMetadataRequest.

source_contract_id

Type: uint32

Description: If this instrument is double-quoted the field contains a contract id to request corresponding source contract metadata (see ContractMetadataRequest and ContractMetadata.contract_id).

issuer

Type: string

Description: Equity issuer.

option_maturity_id

Type: string

Description: Option contract’s maturity ID.

conversion_metadata

Type: ConversionMetadata

Description: Metadata used for real-time and trading data conversion.

market_state_group_id

Type: sint32

Description: ID used for MarketStateMetadataRequest.

settlement_method

Type: uint32

Description: Settlement method. This field is associated with SettlementMethod enum type.

exercise_style

Type: uint32

Description: Exercise style, for options only. This field is associated with ExerciseStyle enum type.

pricing_convention

Type: uint32

Description: Pricing convention. This field is associated with PricingConvention enum type.

is_user_defined_instrument

Type: bool

Description: True if contract represents user-defined instrument.

bar_building_tick_types

Type: uint32

Description: List of tick types used in bar building. This field is associated with BarBuildingTickType enum type.

Note: BAR_BUILDING_TICK_TYPE_SETTLEMENT is used only in time bars.

Note: Not provided for Synthetic Strategies.

quoted_in

Type: string

Description: Describes what the contract is quoted in. E.g. “USD per Barrel”, “Cents per Bushel”

product_symbol_id

Type: string

Description: Symbol ID (symbol_browsing_2.Symbol.id) of corresponding product if it was assigned to the contract.

hedge_with_contract_id

Type: uint32

Description: Identifier of the contract (ContractMetadata.contract_id) used for hedging, if applicable. If not set, it is assumed to be the same as source contract.

actual_future_contract_id

Type: uint32

Description: If a contract is a synthetic version of real one, this field contains a ContractMetadata.contract_id of real contract.

exchange_id

Type: sint32

Description: Exchange ID this instrument belongs to.

supports_continuation

Type: bool

Description: True if the contract supports continuation bars.

instrument_business_type_id

Type: uint32

Description: Instrument business type identifier.

Note: This identifier is not guaranteed to be stable, so corresponding instrument business type information should be obtained from results of SymbolCategoryListRequest (see symbol_browsing_2.SymbolCategory.instrument_business_type_id field), instead of saving/using this id between sessions to WebAPI.

close_sources

Type: uint32

Description: Sources of closing price. Closing price can be found in message MarketValues and historical bars (message TimeBar and other). Corresponding field name in related messages is scaled_close_price. Order of sources defines what is used as closing price if several sources are available (from highest to lowest priority). This field is associated with CloseSource enum type.

open_close_type

Type: uint32

Description: Open/close type. This field is associated with OpenCloseType enum type. OPEN_CLOSE_TYPE_NOT_USED if not set.

is_synthetic

Type: bool

Description: True if this contract exists only within CQG systems, and doesn’t exist on any exchange. For example, it could be a synthetic strategy or a simulated exchange strategy.

moniker

Type: string

Description: Label temporarily attached to the instrument for display purposes. Some exchanges have well-known strings with which they label various instruments - both simple and complex.

Enum MarginStyle

Description: Margin style (for options).

Values

      MARGIN_STYLE_FUTURE = 1

     The premium is paid on exercise/ expiry (position is included to OTE calculation).

      MARGIN_STYLE_PREMIUM = 2

     Premium is subtracted from account balance when order is filled (position is included to MVO/UPL calculation).