Skip to content

Commit 2ea5ad6

Browse files
authored
Update NiftyMonthOptions_OHLC_vol_OI
1 parent 8e1359f commit 2ea5ad6

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎NiftyMonthOptions_OHLC_vol_OI‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ df_opinst = df_opinst[~(df_opinst['expiry'] > exp_date + datetime.timedelta(days
4242
df_opinst = df_opinst[(df_opinst['expiry'] > exp_date - datetime.timedelta(days=2))]
4343
print("expiry date ", df_opinst,df_opinst.columns.values)
4444

45-
NSELTPformate=['NFO:{}'.format(i) for i in df_opinst.tradingsymbol.values]
46-
OHLCdict = kites[0].quote(NSELTPformate)
47-
print(OHLCdict)
48-
4945
df = pd.DataFrame(columns=['tradingsymbol', 'instrument_token', 'timestamp', 'last_price', 'open', 'high', 'low', 'close', 'volume', 'oi'])
5046

5147
print("Waiting to get open price..........", datetime.datetime.now())
@@ -61,6 +57,8 @@ while keep_running :
6157
try :
6258
dfi = pd.DataFrame(columns=['tradingsymbol', 'instrument_token', 'timestamp', 'last_price', 'open', 'high', 'low', 'close',
6359
'volume', 'oi'])
60+
NSELTPformate=['NFO:{}'.format(i) for i in df_opinst.tradingsymbol.values]
61+
OHLCdict = kites[0].quote(NSELTPformate)
6462
for key, value in OHLCdict.items():
6563
try:
6664
tradingsymbol = key.split(":")[1]

0 commit comments

Comments
 (0)