Some expiry date is missing

12345k
`code

import pandas as pd
nse = kite.instruments('NFO') #replace 'NSE' with 'BSE' for BSE data
nse_data = pd.DataFrame(nse)
nse_data['date'] = pd.to_datetime(nse_data['expiry'], format='%Y-%m-%d')
nse_data[nse_data["name"]=="FINNIFTY"].expiry.unique()
`
array([datetime.date(2024, 2, 27), datetime.date(2024, 1, 30),
datetime.date(2024, 3, 26), datetime.date(2024, 1, 16),
datetime.date(2024, 1, 23), datetime.date(2024, 2, 6),
datetime.date(2024, 2, 13)], dtype=object)

I can't able to get 09-01-2024 and 02-01-2024 date expiry data. Kindly guide me how to get the data
Tagged:
  • rakeshr
    I can't able to get 09-01-2024 and 02-01-2024 date expiry data
    nse = kite.instruments('NFO')
    This fetches the current day/last trading day instrument list. As you are fetching as on date > 09-01-2024 and 02-01-2024. Those expired contracts won't be available.
Sign In or Register to comment.