Static IP for Dhan HQ API
Dhan HQ checks the source IP on order APIs. You can register more than one address, but a rotating home IP still burns slots. One dedicated IPv4 is the stable option.
Dhan API facts
- API: Dhan HQ
- Portal: web.dhan.co
- Whitelist: API profile → Static IP
- IPv4: yes
- IPv6: confirm in portal
- Max IPs: Dhan allows multiple whitelist slots per app (commonly up to 5 — confirm in portal)
- Protocols: HTTP proxy, REST, WebSocket
- Published: 2026-09-22
- Last verified: 2026-09-27
- Next review: 2026-12-27
- Verification source: Official developer portal web.dhan.co. IPv6 and max-IP limits are marked “confirm in portal” until we re-check the live form.
How to whitelist a static IP
- Allocate Algo-IP IPv4 (IPv6 only if Dhan’s field accepts IPv6).
- In web.dhan.co open API profile → Static IP and paste the address.
- Set HTTP proxy host + port 443 on REST and WebSocket clients.
- Verify egress with api.ipify.org before the first live order.
Python / proxy hint
Use requests Session.proxies or httpx proxies pointing at HOST:443.
Common errors
Dhan 401 / 403 IP error
Order did not exit the whitelisted IP. Confirm proxy on both REST and market-data sockets.
IPv6 is ₹99/month only when an IPv4 VPS already has a free IPv6 and this broker’s form accepts an IPv6 literal. IPv4 is ₹199/month on a 12-month term.
Related guide: dhan-hq-api-static-ip-whitelisting-guide. Also see dedicated IPv4, trading proxy, broker setup wizard and all brokers.
Other broker setups