How to obtain the OPEN, HIGH, LOW, CLOSE historical data of options in EIKON API?

How to obtain the OPEN, HIGH, LOW, CLOSE historical data of options in EIKON API?
Tagged:

Best Answer

  • nick.zincone
    Answer ✓

    Hi @yuyang

    You can using the following command to get the option chain constituents:

    option_chain,err = ek.get_data('0#QQQ*.U', ['TRADE_DATE'])

    ahs.png

    You then can process the response to retrieve historical values for each constituent. For example,

    ts = ek.get_timeseries('QQQQ312218000.U', start_date="2022-01-01", 
    end_date="2022-05-27")

    ahs.png

Answers

  • Hi @yuyang ,

    ek.get_timeseries can be used for this, for example

    import refinitiv.dataplatform.eikon as ek
    ek.set_app_key('###YOUR_APP_KEY###')

    ek.get_timeseries(['VOD.L', 'GOOG.O'])

    1653892278608.png

    parameters can be used to get the data during specific period with specific interval

    ek.get_timeseries(['VOD.L', 'GOOG.O'], 
    start_date='2022-05-10',
    end_date='2022-05-20',
    interval='minute') # Possible values: 'tick', 'minute', 'hour', 'daily', 'weekly', 'monthly', 'quarterly', 'yearly' (Default 'daily')

    1653892442957.png

    More information can be found in the resources below from the Developer portal site

    Hope this helps

  • 我需要的获取期权的历史数据, 您知道怎么传递期权代码吗?

  • What I need is to get the historical data of the option, do you know how to pass the option code? Can you give me an example of getting an option?

  • hi @yuyang ,

    Is this what you're looking for? Find Your Right Companies with SCREENER | Eikon Data APIs(Python)

    or could you please clarify more on an option code you'd like to get, let's say an example of the option code you're interested.

  • For example, I want to get all the option history data of QQQ from 2022-01-01 to 2022-05-27, including his open, high, low, close. Note that this is the option data, not the stock data for this code