Getting extra data of IB contracts

Accessing additional information

Interactive Brokers .NET data plugin provides access to additional information of the traded securities.
 
These pieces of information had to be coded into the AFL include files or updated manually in AmiBroker's database or must have been kept in the traders mind and the trader had to take action manually.
 
AFL script can query plugin's symbol status (i.e. valid, tradable security) and symbol's properties in Interactive Brokers database in real time (i.e.: market hours, liquide market hours, primary exchange, etc.)
 
AFL scripts can access these pieces of additional information using the GetExtraData AFL function (See AmiBroker's help).
 
Getting these data items are this easy:

extraData = GetExtraData("ContractDetails.TradingHours");

See the IB Extra Data.afl and IB TickSize.afl formula for sample.

Accessable security properties

Symbol status
  • IsValid
  • IsKnown

Quotation (chart) data status

  • QuoteDataStatus
  • LastTickDate
  • LastTickTime

Contract (InteractiveBroker's contract database - ContractDetails object)

  • ContractDetails.Summary.Symbol
  • ContractDetails.Summary.SecurityType
  • ContractDetails.Summary.Expiry
  • ContractDetails.Summary.Strike
  • ContractDetails.Summary.Right
  • ContractDetails.Summary.Multiplier
  • ContractDetails.Summary.Exchange
  • ContractDetails.Summary.Currency
  • ContractDetails.Summary.LocalSymbol
  • ContractDetails.Summary.PrimaryExchange
  • ContractDetails.Summary.IncludeExpired
  • ContractDetails.Summary.ComboLegsDescription
  • ContractDetails.Summary.ContractId
  • ContractDetails.Summary.SecId
  • ContractDetails.MarketName
  • ContractDetails.TradingClass
  • ContractDetails.MinTick
  • ContractDetails.PriceMagnifier
  • ContractDetails.OrderTypes
  • ContractDetails.ValidExchanges
  • ContractDetails.UnderConId
  • ContractDetails.Cusip
  • ContractDetails.Ratings
  • ContractDetails.DescriptionAppend
  • ContractDetails.BondType
  • ContractDetails.CouponType
  • ContractDetails.Callable
  • ContractDetails.Putable
  • ContractDetails.Coupon
  • ContractDetails.Convertible
  • ContractDetails.Maturity
  • ContractDetails.IssueDate
  • ContractDetails.NextOptionDate
  • ContractDetails.NextOptionType
  • ContractDetails.NextOptionPartial
  • ContractDetails.Notes
  • ContractDetails.LongName
  • ContractDetails.ContractMonth
  • ContractDetails.Industry
  • ContractDetails.Category
  • ContractDetails.Subcategory
  • ContractDetails.TimeZoneId
  • ContractDetails.TradingHours
  • ContractDetails.LiquidHours

Real Time Window data status

  • UpdateRecentInfo
  • RecentInfo.Ask
  • RecentInfo.Bid

Sample of trading hours printed on the chart of MSFT