Introduction

View as MarkdownOpen in Claude

Class describing an instrument’s definition.

NameTypeDescription
ConIdintThe unique IB contract identifier.
SymbolstringThe underlying’s asset symbol.
SecTypestringThe security’s type: STK – stock (or ETF) OPT – option FUT – future IND – index FOP – futures option CASH – forex pair BAG – combo WAR – warrant BOND- bond CMDTY- commodity NEWS- news FUND- mutual fund.
LastTradeDateOrContractMonthstringThe 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.
LastTradeDatestringThe contract’s last trading day.
StrikedoubleThe option’s strike price.
RightstringEither Put or Call (i.e. Options). Valid values are P, PUT, C, CALL.
MultiplierstringThe instrument’s multiplier (i.e. options, futures).
ExchangestringThe destination exchange.
CurrencystringThe underlying’s currency.
LocalSymbolstringThe contract’s symbol within its primary exchange. For options, this will be the OCC symbol
PrimaryExchstringThe contract’s primary exchange. For smart routed contracts, used to define contract in case of ambiguity.Should be defined as native exchange of contract. For exchanges which contain a period in name, will only be part of exchange name prior to period, i.e. ENEXT for ENEXT.BE
TradingClassstringThe 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”
IncludeExpiredboolIf 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.
SecIdTypestringSecurity’s identifier when querying contract’s details or placing orders ISIN – Example: Apple: US0378331005 CUSIP – Example: Apple: 037833100.
SecIdstringIdentifier of the security type. More…
DescriptionstringDescription of the contract.
IssuerIdstringIssuerId of the contract.
ComboLegsDescriptionstringDescription of the combo legs.
ComboLegsListThe legs of a combined contract definition. More…
DeltaNeutralContractDeltaNeutralContractDelta and underlying price for Delta-Neutral combo orders. Underlying (STK or FUT)