API Support Forum
OEC API > API Support > Option chain
Author Topic: Option chain
(5 messages, Page 1 of 1)
Moderators: VPfau
MMedved86
Posts: 20
Joined: Sep 09, 2016


Posted: Oct 04, 2016 @ 09:18 AM             Msg. 1 of 5
How do I get a list of all options for a symbol? The Contract has Options property, and HasOptions property. But, for example, for ESZ6 Contract, the HasOptions is true, but the Options has the Count of 0.
Edited by MMedved86 on Oct 04, 2016 09:19 AM
VPfau
Moderator
Posts: 164
Joined:


Posted: Oct 04, 2016 @ 02:26 PM             Msg. 2 of 5
We do not load contracts which are not required by other part of API. If you don't have related objects (positions, quote subscriptions etc), you will have empty Options list.
So, you need load options explicitly. I've wrote a small sketch for you. Please find it here https://bitbucket.org/snippets/GainFuturesDev/7oLd4/options-lookup
Vitaliy Pfau
MMedved86
Posts: 20
Joined: Sep 09, 2016


Posted: Oct 06, 2016 @ 02:30 PM             Msg. 3 of 5
Thank you, Vitaliy, this works well, except - even if I put a high number in DesiredResultCount, the # of contracts returned for ESZ6, for example, is 500. In OEC Trader when you bring up Option Chain for ESZ6 there are a lot more than 500 options there.

Is there a way to get all the options?
MMedved86
Posts: 20
Joined: Sep 09, 2016


Posted: Oct 10, 2016 @ 03:30 PM             Msg. 4 of 5
... ping?
VPfau
Moderator
Posts: 164
Joined:


Posted: Oct 11, 2016 @ 01:23 PM             Msg. 5 of 5
The SymbolLookup can request limited amount of contracts only. This amount is a setting for our servers and could be changed with no notification. You can refine your symbol lookup request and send a series of requests. This is recommended way to obtain contacts.
Vitaliy Pfau