EDIS API failing with error 500

@Hardik the edis API is failing with error 500. Can you please check?

PS: I haven’t changed the code in last 1 year and it has been working flawlessly

--- Logging error ---
Traceback (most recent call last):
  File "/opt/pheonix/edis/edis_api.py", line 135, in authorize_edis
    dhan_callback_response_page = dhan_callback(txn_details_for_dhan_callback)
  File "/opt/pheonix/edis/edis_api.py", line 118, in dhan_callback
    response.raise_for_status()
  File "/home/ubuntu/.local/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error:  for url: https://txn.dhan.co/txnws/ReturnUrl/edis

During handling of the above exception, another exception occurred:


This happened on both the instances I have

Did some digging here. Eventually today morning the holdings API said that I have no holdings, which is not true.

Below are the logs from both of my instances which are running two different accounts.


Hello @sv28

We checked logs at our end fro eDIS, and we received one request from your account today which was successful. On Portfolio showing “No Holdings”, this is not intended, will troubleshoot this.

Do let us know if eDIS is still not working for you.

@Hardik The one request you saw in your system which I did manually from dhan app because the script was failing with 500 error. However, the automated system failed multiple times. I’ve added the logs in my original message. Please let me know if some more information is needed from my side.


I realised that I am not receiving OTP from CDSL. Not sure why such issue


Upon TPIN verification, I am getting this from the form:

<h2>Some data is missing in posted Form. Please check and try again.</h2>
    </div>

Did something change from CDSL because this code was working perfectly until last Friday?

@Hardik request your attention here. This is breaking my workflow. This code was working perfectly fine until yesterday and today worked once in between multiple errors. Can you please help here?

Would really appreciate getting on a call to resolve this.

@Hardik faced the No holdings found issue today morning as well


Hello @sv28

Will connect with you on this. I would recommend running eDIS authorisation post 9 AM.

1 Like

Kudos to @Hardik for hopping on the call and sharing the RCA. Really appreciate it. cc: @PravinJ

1 Like

@Hardik The No holdings issue came today morning as well

Hello @sv28

Will discuss this with the team on this. Meanwhile, can you start the eDIS process post 9? This should ensure that your scrip runs without any issues.

1 Like

Yes, I have moved it out of my pre-market and scheduled a separate cron for 9:00 AM IST