To get stock contract, it requires only 4 fields.?
?
Name = "SPY"
Exchange = "SMART"
SecType = "STK"
Currency = "USD"
?
For stock options, the 4 fields above + 3 more?
?
Right = "C"
Strike = 650
LastTradeDateOrContractMonth = "20241231"
?
When it comes to futures and futures options, it gets messy. For example, after reading couple of posts in this group, this is the contract definition that I used to subscribe to live data feed for ES futures. Of course, "SecType" = "FUT" and "Exchange" = "SMART" would be more appropriate but here we go.??
?
Name = "ES"
Exchange = "CME"
SecType = "IND"
Currency = "USD"
?
I have no idea why it has to be "IND" instead of "FUT" but somehow it worked for "reqMktData". Meanwhile, when I try to pass this to "reqContractDetails", I get "No security definition was found for the request".?The same happens when I try to request contract details for futures options.
The funny part is that I don't populate these parameters manually, I just request all open orders and positions, copy contract object from there and use it in reContractDetails but IB API returns "No security found" error for it. In other words, IB API returns INCORRECT data that can't be used to make other requests.?
?
Hence the question, Is there a map or table that clearly defines which security type and exchange need to be used with specific securities, e.g. if I have these assets, how do I create method that correctly populates properties for them, so I could use their contract definitions in other API calls, like reqMktData?
?
- SPY
- SPY call option
- ES futures
- ES futures call option?
- EURUSD