Navigation

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

    ONE_MINUTE Interval Historical Data inconsistent

    Bugs
    2
    3
    12
    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.
    • N
      Nimish05Z last edited by

      Trying to fetch Historical Data (ONE_MINUTE interval) for any month's 1st date to last date, but in response, getting the data from 1st date's time 13:26, and not 9:15, working fine for other intervals. Please solve the issue and let us know as well.

      All formats tried and also tried to debug with GP, but no help.

      2025-01-01 00:00
      2025-01-01 09:15
      ...

      A 1 Reply Last reply Reply Quote 0
      • A
        admin @Nimish05Z last edited by

        @nimish05z Please share your api request snippet.

        N 1 Reply Last reply Reply Quote 0
        • N
          Nimish05Z @admin last edited by

          @admin

          	params = {
          		"exchange": "NSE",
          		"symboltoken": "99926000",
          		"interval": "ONE_MINUTE",
          		"fromdate": "2025-01-01 09:15",
          		"todate": "2025-01-31 15:30",
          	}
          	data = smartApi.getCandleData(params)
          	data = pd.DataFrame(data["data"], columns=["datetime", "open", "high", "low", "close", "volume"])
          	print(data)
          
                             datetime      open      high       low     close  volume
          

          0 2025-01-02T13:25:00+05:30 24118.20 24121.95 24109.65 24121.70 0
          1 2025-01-02T13:26:00+05:30 24121.75 24129.75 24116.85 24117.40 0
          ... ... ... ... ... ... ...
          7998 2025-01-31T15:28:00+05:30 23529.15 23545.90 23529.15 23536.90 0
          7999 2025-01-31T15:29:00+05:30 23537.80 23546.80 23529.45 23533.85 0

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