Angel One SmartAPI IP Not Whitelisted — Fix AG8001 / Origin Errors
Angel One SmartAPI IP not whitelisted or AG8001/AB1004 after login? Enable the proxy before generateSession, then whitelist the dedicated Mumbai IPv4.
Where Angel One stores the IP
Open smartapi.angelone.in → your app → IP restriction. Paste one dedicated IPv4. If the field rejects IPv6, do not buy the ₹99 plan for this broker — use IPv4.
Why login works and orders fail (or the reverse)
generateSession is origin-checked. Traders often complete TOTP on a browser without the proxy, then run Python with proxies set. The session is tied to the browser IP; the next REST call from the bot looks like a different client.
Process-wide proxy before SmartAPI
Angel One errors this fixes
- IP not whitelisted / IP restriction on the app.
- AG8001 / AB1004 session errors after a router restart.
- 403 on order endpoints while the historical API still answers — a second HTTP client bypassed the proxy.
Full portal steps: /brokers/angel-one. Keep SmartAPI WebSocket on the same HOST:443 credentials.