pub struct Contract {Show 20 fields
pub contract_id: i32,
pub symbol: String,
pub security_type: SecurityType,
pub last_trade_date_or_contract_month: String,
pub strike: f64,
pub right: String,
pub multiplier: String,
pub exchange: String,
pub currency: String,
pub local_symbol: String,
pub primary_exchange: String,
pub trading_class: String,
pub include_expired: bool,
pub security_id_type: String,
pub security_id: String,
pub combo_legs_description: String,
pub combo_legs: Vec<ComboLeg>,
pub delta_neutral_contract: Option<DeltaNeutralContract>,
pub issuer_id: String,
pub description: String,
}Expand description
Contract describes an instrument’s definition
Fields§
§contract_id: i32The unique IB contract identifier.
symbol: StringThe underlying’s asset symbol.
security_type: SecurityType§last_trade_date_or_contract_month: StringThe contract’s last trading day or contract month (for Options and Futures). Strings with format YYYYMM will be interpreted as the Contract Month whereas YYYYMMDD will be interpreted as Last Trading Day.
strike: f64The option’s strike price.
right: StringEither Put or Call (i.e. Options). Valid values are P, PUT, C, CALL.
multiplier: StringThe instrument’s multiplier (i.e. options, futures).
exchange: StringThe destination exchange.
currency: StringThe underlying’s currency.
local_symbol: StringThe contract’s symbol within its primary exchange For options, this will be the OCC symbol.
primary_exchange: StringThe contract’s primary exchange. For smart routed contracts, used to define contract in case of ambiguity. Should be defined as native exchange of contract, e.g. ISLAND for MSFT For exchanges which contain a period in name, will only be part of exchange name prior to period, i.e. ENEXT for ENEXT.BE.
trading_class: StringThe trading class name for this contract. Available in TWS contract description window as well. For example, GBL Dec ’13 future’s trading class is “FGBL”.
include_expired: boolIf set to true, contract details requests and historical data queries can be performed pertaining to expired futures contracts. Expired options or other instrument types are not available.
security_id_type: StringSecurity’s identifier when querying contract’s details or placing orders ISIN - Example: Apple: US0378331005 CUSIP - Example: Apple: 037833100.
security_id: StringIdentifier of the security type.
combo_legs_description: StringDescription of the combo legs.
combo_legs: Vec<ComboLeg>§delta_neutral_contract: Option<DeltaNeutralContract>Delta and underlying price for Delta-Neutral combo orders. Underlying (STK or FUT), delta and underlying price goes into this attribute.
issuer_id: String§description: String