Static IP for AmiBroker auto trading
If AmiBroker places orders through a bridge running on your own PC or VPS, you need a static IP. AmiBroker sends the signal to the bridge, and the bridge calls your broker's API from that machine, so the broker sees that machine's public IP. It has to be an IP you've registered with the broker.
How an AmiBroker bridge sends orders
Take OpenAlgo's AmiBroker modules as an example. Your AFL code posts orders to OpenAlgo running locally, by default on http://127.0.0.1:5000, and OpenAlgo calls the broker. Other bridges work the same way: AmiBroker talks to a local program, and that program talks to the broker. Under NSE's rules that's a client running their own algo, which needs the client's own static IP.
Give the bridge a static IP
- Run the bridge on a server with a static IP, such as a VPS with a reserved IP. AmiBroker can stay on your PC and post signals to it.
- Route the bridge's broker calls through a dedicated-IP proxy. With OpenAlgo, add
HTTPS_PROXYto its.env; the steps are on static IP for OpenAlgo. For other bridges, check whether the software has a proxy setting. If it doesn't say, ask its support before you buy anything.
Then register the IP with your broker. Most brokers allow one change a week, so check it first with curl -x http://USER:PASS@HOST:PORT https://ifconfig.co.
AmiBroker static IP: FAQs
Does AmiBroker itself need a static IP?
AmiBroker doesn't talk to the broker directly; the bridge does. What matters is the IP the bridge's broker calls leave from.
Does it matter if AmiBroker and the bridge are on the same PC?
No. The local signal from AmiBroker to the bridge doesn't reach the broker. Only the bridge's calls to the broker need the registered IP.
Sources
Get your dedicated static IP
IPv6 ₹50 a month, IPv4 ₹200 a month, plus GST. Live in minutes, whitelisted once.