Previously am getting LTP but since yesterday am getting error

CE_symbol_name, PE_symbol_name, strike_price = tsl.ATM_Strike_Selection(Underlying=‘NIFTY’, Expiry=0)
print(f"ATM CE Symbol: {CE_symbol_name}, ATM PE Symbol: {PE_symbol_name}, Strike Price: {strike_price}“)
all_values = tsl.get_option_greek(strike=24850, expiry=0, asset=‘NIFTY’, interest_rate=10, flag=‘all_val’, scrip_type=‘CE’)
print(f":chart_increasing: Nifty Option Greeks: {all_values}”)
indexLTP = tsl.get_ltp_data(“NIFTY 07 OCT 24850 CALL”)[“NIFTY 07 OCT 24850 CALL”]
print(tsl.get_ltp_data(“NIFTY 07 OCT 24850 CALL”))

print(f":chart_increasing: Initial Nifty LTP: {indexLTP}")

ATM CE Symbol: NIFTY 07 OCT 24850 CALL, ATM PE Symbol: NIFTY 07 OCT 24850 PUT, Strike Price: 24850
Exception in get_option_greek: ‘NIFTY 07 OCT 24850 CALL’
:chart_increasing: Nifty Option Greeks: None
Traceback (most recent call last):
File “c:/Users/AYESHA/Downloads/MomentumCandle_V6_S30/test.py”, line 15, in
indexLTP = tsl.get_ltp_data(“NIFTY 07 OCT 24850 CALL”)[“NIFTY 07 OCT 24850 CALL”]
KeyError: ‘NIFTY 07 OCT 24850 CALL’

Try when market is live. Yesterday was a market holiday.

1 Like

@mallika_Begum Can you confirm when did you poll this endpoint?Also, which endpoint are you getting the error on?