Futures and options chains

Hi,

how can I get a futures list and their expiry date into the python API.

Basically I want to import all futures linked to e.g. 0#W: with their expiry. I would also like to import the option chain linked to a future.

Best Answer

  • hi @joris,

    you can get the futures/expiration dates with one request:

    req, err = tr.get_data(['0#W:'], ['EXPIR_DATE'])

    result:

    image

    I could not find a good way to extract the option chains though, you might have to parse it from the contract specification pages (CBT/W) or, in this case, by adding a + to the contact root: 0#W+.

    You can also read this to get all underlying instruments for an options chain.

Answers