Static IP for OpenAlgo
Yes, OpenAlgo needs a static IP. It's self-hosted software, so your broker sees the IP of the machine running OpenAlgo, and order calls are accepted only from an IP registered with the broker. If that machine is a home PC or a server without a fixed IP, you can send OpenAlgo's broker calls through a proxy with a dedicated IP.
Why OpenAlgo needs your own IP
- OpenAlgo is designed to be self-hosted, and its data stays on infrastructure you control.
- OpenAlgo's own static IP guide says the broker only sees your server's static IP, and that a static IP is mandatory for placing, modifying and cancelling orders.
- NSE's retail algo FAQ says a client who runs their own algo hosts it with a static IP at their end.
Two ways to get the static IP
- Run OpenAlgo on a server with a static IP. A cloud VPS with a reserved IP works. OpenAlgo's docs cover this route.
- Keep OpenAlgo where it is and route broker calls through a proxy. Useful if you run it on your own PC, or on a server whose IP you can't keep.
Route OpenAlgo through a proxy
OpenAlgo's shared broker HTTP client is built on httpx with environment proxy settings kept, and OpenAlgo loads its .env file at startup. So you can add the proxy to .env:
HTTPS_PROXY = 'http://USER:PASS@HOST:PORT'
HTTP_PROXY = 'http://USER:PASS@HOST:PORT'
NO_PROXY = 'localhost,127.0.0.1'
NO_PROXY keeps OpenAlgo's calls to itself, and tools like AmiBroker posting to it locally, off the proxy. Restart OpenAlgo after the change.
- Check the proxy's exit IP from the same machine:
curl -x http://USER:PASS@HOST:PORT https://ifconfig.co - Register that address with your broker. Most brokers allow one change a week. See your broker's page.
- Confirm the broker sees the right address before trading. Some brokers show it: Kotak Neo has a "what's my IP" call and Dhan shows a detected IP in its sandbox.
Some broker integrations in OpenAlgo also stream market data. Brokers usually check the IP only on order calls, so streaming needn't go through the proxy.
IPv4 or IPv6?
That's set by your broker, not OpenAlgo. Zerodha, Upstox and Dhan accept IPv6, which is cheaper. Angel One accepts only IPv4. Check static IP by broker.
OpenAlgo static IP: FAQs
Do I need a static IP if I run OpenAlgo on my laptop?
Yes. Your broker sees your laptop's public IP, which changes on most home connections. Either move OpenAlgo to a server with a static IP or route its broker calls through a dedicated-IP proxy.
Can AmiBroker or TradingView use the same IP through OpenAlgo?
Yes. They send signals to OpenAlgo, and OpenAlgo places the orders, so only OpenAlgo's broker calls need to leave from the static IP.
Sources
- OpenAlgo documentation
- OpenAlgo docs: static IP
- OpenAlgo: static IP guide
- OpenAlgo source: shared httpx client
- NSE: FAQs on retail algo trading
Get your dedicated static IP
IPv6 ₹50 a month, IPv4 ₹200 a month, plus GST. Live in minutes, whitelisted once.