Intraday Minute Data Not Stable

I am polling “dhan.intraday_minute_data” once every minute.
I get this error once every few minutes

intraday_daily_minute_charts: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

Dhan “Intraday minute data” does not seem stable.

@Hardik any idea why :point_up_2:

@Hardik
Are your Data APIs stable enough to be used in actual production? If it is still in Beta, please say so… If you are hiding a suspect system, it is akin to a sleazy corrupt contractor who uses poor materials to build a bridge, thereby endangering lives.

To the best of your knowledge, are Dhan Data APIs stable?

Tried generating new token. Still have problems.

I am quering just 3 security ids per minute using dhan.intraday_minute_data in this test, and I get “disconnect errors” every few minutes.

Any @staff interested in replying?

It appears polling Options is more efficient than polling index (which maybe the culprit)

This one isn’t efficient

dhan.intraday_minute_data(
    security_id='25',
    exchange_segment='IDX_I',
    instrument_type='INDEX'
)['data']['close'][-1]

Why would that be?

@PravinJ @Hardik @RahulDeshpande pls check and respond to @VijayNair

Hello @VijayNair

The error that you are seeing here is not because of server disconnecting connection or not sending response on API. If this was the case, then it would have been 504 Gateway Timeout error.

This is a Python library error wherein the system itself is disconnecting the request connection. There might be multiple reasons for this, can be any network layer disconnecting. If you are polling all three requests at the same time, can you try throttling this and sending one after another. Just to clarify, this is not because of server taking time to respond or us not handling concurrent requests, rather because sometimes the local system itself terminates parallel requests.

Hope this helps! Also, just to reassure you, there are thousands of users fetching data via APIs on Dhan. We launched DhanHQ APIs back in 2022 itself, and APIs are stable with low response times as well.

  1. The requests are made one after another (but without any delay)
  2. I use this workflow with Kotak, Finvasia, Zerodha and everything is stable there…
  3. It appears the issue is mainly while querying index ltp.

Il post on Monday after further tests. Please try to reply sooner next time…

1 Like