Data Discrepency when fetching Historic Data of nifty and banknifty futures


  • Data Discrepency when fetching nifty and banknifty futures contract for 23-DEC-2023 contract

    def hist_data(ticker,st_date,end_date,interval,exchange="NFO"):
    params = {
    "exchange": exchange,
    "symboltoken": ticker,
    "interval": interval,
    "fromdate": st_date,
    "todate": end_date
    }
    print(params)
    hist_data = obj.getCandleData(params)
    print(hist_data)
    df_data = pd.DataFrame(hist_data["data"],
    columns = ["date","open","high","low","close","volume"])
    df_data.set_index("date",inplace=True)
    return df_data

    data = hist_data("61627","2023-11-29 09:15", "2023-12-01 15:30", "ONE_DAY",)
    8b7a1360-250e-4e50-bcf2-5bd9e4098267-image.png

    the Data for 31-11-23 is from Nov month contract
    the Data for 01-12-23 is from Dec month contract

    please update