Author |
Topic: Option chain (5 messages, Page 1 of 1) |
||||
---|---|---|---|---|---|
Moderators: VPfau | |||||
MMedved86 Posts: 20 Joined: Sep 09, 2016 |
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: |
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 |
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 |
... ping?
|
||||
VPfau Moderator Posts: 164 Joined: |
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
|
||||