Open davebs opened 8 years ago
Apparently 3 spaces between the ticker symbol and the numbers does the trick? eg ".BAC 160205C00012500"
Although this leaves the issue of figuring out what options were available at which dates. getOptionChain doesn't seem to let you specify a date range. Any advice on this? I'm basically trying to get option prices from certain date ranges, without necessarily knowing strike price and strike date ahead of time. Maybe not possible?
Have you ever tried this on options? I seem to be having trouble requesting option tick data using a variety of ticker formats (eg ".BAC 160205C00012500", ".BAC160205C00012500", etc.)
Digging into the source code and SDK docs, I notice that there's an _ATOPTION_SYMBOL (which doesn't get used as far as I can tell) and an _ATSYMBOL class (which is used for the ticker requests). It does check if I'm requesting an option (by checking beginning of string for ".") and sets the ATSYMBOL.symbolType correctly, but it doesn't do any casting past that before sending it off to the server as a request. I'm thinking maybe it needs to, or there should be some code to split out the option ticker string into ATOPTION_SYMBOL fields?
I will keep tracing all this through but wanted to throw it out there just in case there was another solution. Thanks!