Are you looking to fetch quote data for NIFTY 50 indices? Then, instead it should be 'NSE:NIFTY 50'. You can fetch complete trading instrument list from here. Look for exchange and tradingsymbol field and use the same to fetch Quote data i.e exchange:tradingsymbol .
yeah that worked. But is there a way to give trading symbol here dynamically using a variable ? like below doesn't recognise CE_strike_symbol though that is a variable having actual symbol name
Here, CE_strike_symbol is recognized as string rather than variable. As, you have mentioned it inside string quote. Instead, you may try: 'NFO:{}'.format(CE_strike_symbol) You can refer to this article to know more about python string formatting.
NIFTY 50
indices?Then, instead it should be
'NSE:NIFTY 50'
.You can fetch complete trading instrument list from here. Look for
exchange
andtradingsymbol
field and use the same to fetch Quote data i.eexchange:tradingsymbol
.kite.ohlc['NFO:CE_strike_symbol']['last_price']
CE_strike_symbol
is recognized as string rather than variable. As, you have mentioned it inside string quote. Instead, you may try:'NFO:{}'.format(CE_strike_symbol)
You can refer to this article to know more about python string formatting.