Hi,
I am trying to fetch the current open interest data for an option chain using the code below.
df, ek = e.get_data('0#BL2K0+',
['DSPLY_NAME'])
df.fillna(method='ffill',inplace=True)
df.dropna(inplace=True)
data,err= e.get_data(df.Instrument[1:].to_list(),
['DSPLY_NAME','PUTCALLIND','STRIKE_PRC',
'CF_CLOSE','TR.OPENINTEREST','IMP_VOLT',
'NET_CHG(TR.OPENINTEREST(0d),TR.OPENINTEREST(-1d))','EXPIR_DATE'])
( Check the open interest values of the 200 call option, if we consider the OI change values then it would seem to be showing previous days value, but the close price is that of the current price in both data)
Eikon API values:
Terminal values:
The values that I am getting are different from those which are shown on the terminal. How can I get the current values displayed on the terminal.
Hello @varun.divakar,
Apologies for the belated response.
Unfortunately, I was not able to reproduce the discrepancy. Let me discuss how I proceeded, so we can converge on where teh gap may originate?
First I did Python call same as you, and selected a couple of results:
df, err = ek.get_data('0#BL2K0+',['DSPLY_NAME' df.fillna(method='ffill',inplace=Tru df.dropna(inplace=Tru data,err= ek.get_data(df.Instrument[1:].loc[120:140].to_list( ['DSPLY_NAME','PUTCALLIND','STRIKE_PRC','CF_CLOSE','TR.OPENINTEREST','IMP_VOLT','NET_CHG(TR.OPENINTEREST(0d),TR.OPENINTEREST(-1d))','EXPIR_DATE']) data
Results for 199-200:
Then I requested the same 4 instruments from Eikon Excel:
=TR("BL219900E0;BL219900Q0;BL220000E0;BL220000Q0","DSPLY_NAME;PUTCALLIND;STRIKE_PRC;CF_CLOSE;TR.OPENINTEREST;IMP_VOLT;NET_CHG(TR.OPENINTEREST(0d),TR.OPENINTEREST(-1d));EXPIR_DATE",,B7:J1817)
The result for interest appears to look the same:
Are these the right values? Were they retrieved at the same time in your case ( I did one right after the other)?