Hi @vlad.dimanshteyn
You can use the following statement to get your constituents:
option_chain,err = ek.get_data('0#SPX*.U', ['CF_NAME'])
And to get your real-time data, try something like this: (Note: The Pricing interface / WebSocket service has a limitation when making a single request - so you will have to break up the request into buckets - in the example below, I'm using a value of 100).
If you want to get real-time data, I would suggest you look at the pricing cache example which subscribes to data and allows the ability to pull out live data from the cache.
Currently I use:
option_chain, err = ek.get_data('0#SPX*.U', ['TRADE_DATE', 'ACVOL_1'])
option_data_block, err = ek.get_data(instruments =option_chain['Instrument'].tolist(), fields=['PUTCALLIND', 'TRDPRC_1', 'BID', 'ASK', 'TRADE_DATE', 'SALTIM', 'STRIKE_PRC', 'EXPIR_DATE'])
undelying_price, err = ek.get_data('.SPX', ['CF_LAST'])
Are you saying Nick that I can not use those 3 statements to get real time option data and the price of underlying?
I need to get those field real time !!!!
Nick,
I need Web Socket Service for this as I understand, is that correct? That's a separate subscription that I need to get, right? I do no have Refinitiv library to do
from refinitiv.data.content import pricing
I just have Eikon library
Thanks so much for your help