Broker API IP whitelisting explained: how it works and why it breaks

Most brokers only let your API requests through from a pre-approved IP address. Here is what IP whitelisting actually is, why your bot keeps getting locked out, and how to fix it for good.

25 June 2026 · Last updated 27 October 2026 · 3 min read

Short answer: IP whitelisting is a security rule on your broker's side that only accepts API requests coming from a network address you have pre-registered. Requests from any other address are rejected, even with the correct API key. It breaks when your IP changes, because the address your bot connects from no longer matches the one on the whitelist. The fix is to connect from a single fixed address that never changes.

If your algo keeps getting locked out for no obvious reason, whitelisting is almost always the cause. Here is exactly what is happening.

What IP whitelisting actually is

When you place orders through a broker's API, every request carries two things the broker checks:

  1. Your credentials (API key, token, secret): proves who you are.
  2. Your source IP address: proves where the request came from.

Whitelisting is the second check. The broker keeps a short list of addresses it trusts for your account, and silently drops anything that arrives from an address not on that list. This is a deliberate safety layer: even if your API key leaks, an attacker cannot trade from their own machine, because their IP is not whitelisted.

It is the same idea SEBI's algo framework pushes brokers toward. Orders should originate from a known, static source, not from wherever a bot happens to be running that day.

Why your bot keeps getting locked out

The credentials rarely change. The IP address does. That mismatch is what kicks your bot off.

Most home and office internet connections use a dynamic IP: your provider hands you an address from a pool and rotates it whenever your router reconnects, the lease expires, or the ISP reshuffles. Common triggers:

The moment your address changes, every API request starts arriving from an IP that is not on the whitelist. The broker rejects them. Your orders fail, your bot looks "broken," and nothing in your code is actually wrong.

How brokers handle whitelisting

It varies, but the pattern is consistent:

None of these are friendly to a dynamic address. They all assume you are connecting from one stable place.

The fix: connect from one fixed address

The whole problem disappears if the address your bot connects from never changes. That is exactly what a static IP for algo trading gives you: one dedicated address that you whitelist with your broker once and never touch again.

With a fixed source address:

If you are still not sure whitelisting applies to your setup, start with do you need a static IP for algo trading. When you are ready to actually set one up, see how to get a static IP for your trading API.

What TrueIP offers

TrueIP gives you one dedicated IPv6 address per account, hosted on our own Mumbai node with under 2 ms to broker APIs. You whitelist it with your broker once and it stays the same across renewals, so your bot never gets locked out by a changing address again. IPv6 is ₹50 per IP per month + 18% GST (₹59 in all), or ₹500 a year. A dedicated IPv4 is ₹200 per IP per month + GST for brokers that still require it.

Tired of your bot getting kicked off the whitelist? See pricing or get your dedicated static IP.

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

13 November 2026

Angel One SmartAPI: "static IP is already associated with another app"

SmartAPI won't let you create an app because the static IP is already used. Why Angel One maps one IP to one client, and how to trade two accounts.
13 November 2026

Dhan API: DH-905 "Invalid IP"

Dhan rejects API orders with DH-905 Invalid IP when they come from an address it doesn't have on file, or when the token predates the IP. Fixes, step by step.
13 November 2026

Kite Connect: "IP address is already linked to another account"

Zerodha won't save your static IP because it's linked to another account. Why it happens, family sharing rules, and how to fix it without breaking Zerodha's terms.