API Support Forum
OEC API > API Support > List of Options
Author Topic: List of Options
(2 messages, Page 1 of 1)
Moderators: VPfau
DRyaboshapka
Posts: 7
Joined: Aug 31, 2020


Posted: Sep 21, 2020 @ 09:51 AM             Msg. 1 of 2
Hello,

I've looked at the examples posted a long time ago (https://bitbucket.org/snippets/GainFuturesDev/7oLd4/options-lookup) for list of underlying options, and I've attempted to translate the example code to the current GF API version with no luck. Any time I try and Lookup a Symbol that Has Options the Options Property always returns a list of length 0. How do I get a list of options contracts from ESZ20?

Thanks
VPfau
Moderator
Posts: 135
Joined: Oct 26, 2011


Posted: Sep 21, 2020 @ 12:59 PM             Msg. 2 of 2
Hello DRyaboshapka,

Please take a look new snipped available here https://bitbucket.org/GainFuturesDev/workspace/snippets/aLnd95
Notice that this is a loading request which will load all available options for a future contract. If you know symbol of your option you will need symbol lookup like this:
client.Contracts.Lookup.BySymbol("OEW1V20 P4400") and catch response in client.Contracts.Lookup.SymbolLookupReceived event
Vitaliy Pfau