ContractDetails Class Reference

View as MarkdownOpen in Claude

Extended contract details.

NameTypeDescription
ContractContractA fully-defined Contract object.
MarketNamestringThe market name for this product.
MinTickdoubleThe minimum allowed price variation. Note that many securities vary their minimum tick size according to their price. This value will only show the smallest of the different minimum tick sizes regardless of the product’s price. Full information about the minimum increment price structure can be obtained with the reqMarketRule function or the IB Contract and Security Search site.
PriceMagnifierintAllows execution and strike prices to be reported consistently with market data
OrderTypesstringSupported order types for this product.
ValidExchangesstringValid exchange fields when placing an order for this contract.
NoneThe list of exchanges will is provided in the same order as the corresponding MarketRuleIds list.None
UnderConIdintFor derivatives
LongNamestringDescriptive name of the product.
ContractMonthstringTypically the contract month of the underlying for a Future contract.
IndustrystringThe industry classification of the underlying/product. For example
CategorystringThe industry category of the underlying. For example
SubcategorystringThe industry subcategory of the underlying. For example
TimeZoneIdstringThe time zone for the trading hours of the product. For example
TradingHoursstringThe trading hours of the product. This value will contain the trading hours of the current day as well as the next’s. For example
LiquidHoursstringThe liquid hours of the product. This value will contain the liquid hours (regular trading hours) of the contract on the specified exchange. Format for TWS versions until 969: 20090507:0700-1830
EvRulestringContains the Economic Value Rule name and the respective optional argument. The two values should be separated by a colon. For example
EvMultiplierdoubleTells you approximately how much the market value of a contract would change if the price were to change by 1. It cannot be used to get market value by multiplying the price by the approximate multiplier.
AggGroupintAggregated group Indicates the smart-routing group to which a contract belongs. contracts which cannot be smart-routed have aggGroup = -1.
SecIdListListA list of contract identifiers that the customer is allowed to view. CUSIP/ISIN/etc. For US stocks
UnderSymbolstringFor derivatives
UnderSecTypestringFor derivatives
MarketRuleIdsstringThe list of market rule IDs separated by comma Market rule IDs can be used to determine the minimum price increment at a given price.
RealExpirationDatestringReal expiration date. Requires TWS 968+ and API v973.04+. Python API specifically requires API v973.06+.
LastTradeTimestringLast trade time.
StockTypestringStock type.
CusipstringThe nine-character bond CUSIP. For Bonds only. Receiving CUSIPs requires a CUSIP market data subscription.
RatingsstringIdentifies the credit rating of the issuer. This field is not currently available from the TWS API. For Bonds only. A higher credit rating generally indicates a less risky investment. Bond ratings are from Moody’s and S&P respectively. Not currently implemented due to bond market data restrictions.
DescAppendstringA description string containing further descriptive information about the bond. For Bonds only.
BondTypestringThe type of bond
CouponTypestringThe type of bond coupon. This field is currently not available from the TWS API. For Bonds only.
CallableboolIf true
PutableboolValues are True or False. If true
CoupondoubleThe interest rate used to calculate the amount you will receive in interest payments over the course of the year. This field is currently not available from the TWS API. For Bonds only.
ConvertibleboolValues are True or False. If true
Maturitystringhe date on which the issuer must repay the face value of the bond. This field is currently not available from the TWS API. For Bonds only. Not currently implemented due to bond market data restrictions.
IssueDatestringThe date the bond was issued. This field is currently not available from the TWS API. For Bonds only. Not currently implemented due to bond market data restrictions.
NextOptionDatestringOnly if bond has embedded options. This field is currently not available from the TWS API. Refers to callable bonds and puttable bonds. Available in TWS description window for bonds.
NextOptionTypestringType of embedded option. This field is currently not available from the TWS API. Only if bond has embedded options.
NextOptionPartialboolOnly if bond has embedded options. This field is currently not available from the TWS API. For Bonds only.
NotesstringIf populated for the bond in IB’s database. For Bonds only.
MinSizedecimalOrder’s minimal size.
SizeIncrementdecimalOrder’s size increment.
SuggestedSizeIncrementdecimalOrder’s suggested size increment.
FundNamestringFund’s name.
FundFamilystringFund’s family.
FundTypestringFund’s type.
FundFrontLoadstringFund’s front load.
FundBackLoadstringFund’s back load.
FundBackLoadTimeIntervalstringFund’s back load time interval.
FundManagementFeestringFund’s management fee.
FundClosedboolFund closed flag.
FundClosedForNewInvestorsboolFund closed for new investors flag.
FundClosedForNewMoneyboolFund closed for new money flag.
FundNotifyAmountstringFund’s notify amount.
FundMinimumInitialPurchasestringFund’s minimum initial purchase.
FundSubsequentMinimumPurchasestringFund’s subsequent minimum purchase.
FundBlueSkyStatesstringFund’s blue sky states.
FundBlueSkyTerritoriesstringFund’s blue sky territories.
FundDistributionPolicyIndicatorFundDistributionPolicyIndicatorFund’s distribution policy indicator.
FundAssetTypeFundAssetTypeFund’s asset type.