Running a trading bot from home: getting a stable IP for exchange APIs

The bot runs on the PC in the corner. It's been fine for weeks. Then the power goes out, the router restarts, and every order fails because the exchange no longer recognises your IP.

Last updated 29 October 2026 · 4 min read

Running a trading bot from home is completely workable. The weak spot isn't your code or your PC. It's the IP address. Exchanges increasingly want API keys bound to an IP, and a home connection doesn't keep one. You can fix that without moving the bot to a VPS: keep the bot at home, and send its exchange traffic out through a fixed address. A static IP for exchange API keys does exactly that. Here's the whole setup, including the other things that trip up home bots.

Why the home IP is the problem

A home bot hits three things that a server doesn't.

Power cuts and router restarts. Most broadband in India gives you a dynamic address, and a restart can bring a new one. In a lot of places that's a weekly event, sometimes daily.

CGNAT. Many connections share a public address with other customers. Check your router's WAN address. If it falls between 100.64.0.0 and 100.127.255.255, you're behind carrier-grade NAT, and the IP you'd bind your key to isn't yours alone.

IPv4 and IPv6 at the same time. If your connection has both, your bot may reach some exchanges over IPv6 and others over IPv4. Bind the key to one and calls over the other fail. Delta Exchange returns ip_not_whitelisted_for_api_key when that happens, according to its API docs.

Meanwhile the exchange side keeps getting stricter. On Binance, keys without an IP restriction are limited to reading data. Delta Exchange India won't give trading permission without whitelisted IPs. So "just leave the key unrestricted" stops being an option.

Check what your bot looks like from outside

On the PC that runs the bot:

curl -4 https://ifconfig.co
curl -6 https://ifconfig.co

Write both down, then restart your router and run them again. If either changed, the IP restriction on your key will break the same way the next time the power goes.

It also helps to know which exchanges answer on which protocol. In our test from Mumbai on 29 October 2026, Binance, Bybit and WazirX didn't respond over IPv6 at all, while Delta Exchange, OKX and CoinDCX did. Your bot's calls to Binance will go over IPv4 whatever you do.

Three ways to keep one IP

Ask your ISP for a static IP

Possible, but it usually means a business plan, and it ties the bot to that connection. If your ISP has an outage and you switch to a phone hotspot, the IP changes anyway.

Move the bot to a VPS

A VPS with its own IP is the classic answer. It works, and it takes the power cuts out of the picture too. You do give up the home machine you already have, pay for the server, and keep it patched. If you move providers, you rebind every key.

Keep the bot at home, route the exchange traffic through a static IP

This is what TrueIP does. You get a dedicated IPv4 in Mumbai with its own proxy login. The bot sends its exchange calls through it, so every key sees the same address whatever your router does. If you switch to a hotspot during an outage, the exchange still sees the same IP. In ccxt it's two lines:

ex.httpsProxy = "http://USER:PASS@HOST:PORT"   # REST
ex.wssProxy   = "http://USER:PASS@HOST:PORT"   # websockets

Set both. The REST setting doesn't cover websocket streams, so without the second line your price feed still leaves from your home connection. The traffic stays TLS encrypted, so we see the exchange's hostname, not your keys or orders.

The other home-bot problems

A fixed IP solves the whitelist problem, not everything else. A few things worth sorting out while you're at it:

Binding the key

Once the IP is fixed, bind each key to it in the exchange's API settings, and give the key only the permissions the bot needs. For most bots that's reading and trading, never withdrawals. One key per bot means you can revoke one without stopping the others.

And use the setup for exchanges and accounts you're allowed to use. A fixed IP is for binding your own keys, not for getting around anyone's rules.

Quick checklist

Get your dedicated static IP

IPv6 ₹50 a month, IPv4 ₹200 a month, plus GST. Live in minutes, whitelisted once.

Get IPv6 · ₹50/mo + GSTGet IPv4 · ₹200/mo + GST

Keep reading

29 October 2026

GST e-invoice API access: why integrators need a fixed IP

Direct NIC e-invoice API access works only from whitelisted Indian static IPs. Who needs one, how many you can register, and why changing them is slow.
29 October 2026

How to give work-from-home staff access to IP-restricted Tally or ERP

Your ERP only allows the office IP and staff now work from home. How to give them access safely, for web ERPs, Zoho, Microsoft 365 and Tally setups.
29 October 2026

How to lock your crypto exchange API key to one IP (and why you should)

Binding your exchange API key to one IP stops a leaked key being used anywhere else. How to do it, which address to use, and how to keep it from changing.