DhanHQ API
Access Data and Trading via APIs
We request you to please verify the source IP from which the orders are being sent, as the DH-905 Invalid IP query generally occurs when the detected/source IP does not match the whitelisted IP.
To verify the same, please follow the below steps :
1. Log in to the web platform.
2. Go to Profile.
3. Open the Get Trading & Data API section.
4. On the Top right-hand side, click on Sandbox.
5. In the left panel, select IP Setup.
6. Click on Get Static IP.
7. Enter your latest regenerated access token.
8. Click on Send API Request.
Once done, you will receive details such as Primary IP, Secondary IP, Detected IP, and Orders Allowed Status. Please ensure that the Detected/Source IP matches the whitelisted IP configured in your account. If it matches, the Orders Allowed Status will be true. If not, the orders will continue to get rejected.
Additionally, we request you to re-generate the access token once, if the IP's has been added post generating the access token and try placing the order's again.
Related FAQs

