Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs

    Data Discrepency when fetching Historic Data of nifty and banknifty futures

    Test
    0
    1
    8
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      hemanthkumar097 last edited by

      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

      1 Reply Last reply Reply Quote 0
      • First post
        Last post