Author |
Topic: Request Full Option Chains (2 messages, Page 1 of 1) |
||||
---|---|---|---|---|---|
Moderators: VPfau | |||||
MVenè Posts: 4 Joined: Apr 08, 2019 |
Hello, I need to request the list of available options (maturity, strikes) for a given underlying symbol, let's say ES.
After creating the client, connecting to OEC server, etc, this is what I've done: First I look up for all available contracts with "ES" in the symbol name
then when receiving the lookup I check whether the received contracts have options, for those who do, I send a new lookup looking for options. For those who don't I assume they are options coming from the second lookup, and print strike and style. For simplicity, here, I only consider the first received underlying contracts, this results in at most two lookup requests
This looks like should working properly, based on other threads here in the forum. But it doesn't. My output is: ESZ9 3220 Call ESZ9 3345 Call ESZ9 2955 Call Of course there should be many more options available, not only three. But I keep getting only three. If I request a look up on the second available underlying, instead of the first as in the example, I get 23 options returned. This looks very random. |
||||
VPfau Moderator Posts: 164 Joined: |
Hello MVenè,
We have two snippets for option fetching in our repository (3.5 API version) https://bitbucket.org/snippets/GainFuturesDev/7oLd4/options-lookup and https://bitbucket.org/snippets/GainFuturesDev/6eg47K/paginated-options-lookup does it work for you? Vitaliy Pfau
|
||||