It looks like you're new here. If you want to get involved, click one of these buttons!
fr = datetime.strptime('2022-01-01', '%Y-%m-%d')
to = datetime.strptime('2023-01-01', '%Y-%m-%d')
crsldx = 268041
history = kite.historical_data(instrument_token=crsldx, from_date=fr, to_date=to, interval='day')
Outputs :
{'close': 15432.8,
'date': datetime.datetime(2022, 12, 28, 0, 0, tzinfo=tzoffset(None, 19800)),
'high': 15468.15,
'low': 15363.65,
'open': 15390.55,
'volume': 0},
{'close': 15485.2,
'date': datetime.datetime(2022, 12, 29, 0, 0, tzinfo=tzoffset(None, 19800)),
'high': 15517.45,
'low': 15307,
'open': 15370,
'volume': 0},
{'close': 15448.85,
'date': datetime.datetime(2022, 12, 30, 0, 0, tzinfo=tzoffset(None, 19800)),
'high': 15581.95,
'low': 15425.65,
'open': 15557.75,
'volume': 0}]
268041 is the instrument token for Nifty 500 index.
NIFTY 500,268041,1047,0.0,NSE,NIFTY 500,0.0,0.0,EQ,INDICES,,0
Indices are not traded directly ever on any exchange. What are traded are the derivative instruments based on the indexes. These derivatives instruments are available in the futures and options segment.
Therefore, if you retrieve live tickdata or Historical OHLC data for any index, the volume will always be zero.
Also nifty 500 is a composite grouping index and if you check the instrument list you will find there are no derivative instruments in either futures or options segment available for trade. The only index based derivatives available to trade are BANKNIFTY, FINNIFTY, MIDCPNIFTY, NIFTY.
Instead of commenting on poor data quality, you need to work on your poor market knowledge.
Have a good day sir.