---
title: "Fixing IP Not Whitelisted Errors on Broker APIs"
description: "Order rejected for an unregistered IP on Kite Connect, Upstox, Dhan or SmartAPI? Find the IP the broker sees, then fix IPv6, drift, slot, and proxy mistakes."
canonical: https://fixedmark.com/blog/fixing-ip-not-whitelisted-errors-on-broker-apis
updated: 2026-11-10
source: Fixedmark (https://fixedmark.com), BitMask LLP
---

Algo trading · 12 min read

# Fixing IP Not Whitelisted Errors on Broker APIs

The broker saw your order arrive from an address that is not in your registered slots. Print the IP your order client actually leaves from, IPv4 and IPv6 separately, and compare it with what the broker has on file. Then fix the side that is wrong. Force IPv4, pin the egress IP, put it in the right slot and regenerate the token, or give the proxy to the order client itself.

## Confirm the rejection is the IP check

This guide is general technical information, not legal or investment advice. Confirm your broker's current rules before you register or change an IP.

The major Indian brokers now check the source IP of order requests, and only order requests. [Zerodha](https://support.zerodha.com/category/trading-and-markets/general-kite/kite-api/articles/static-ip) requires a static IP for API order placement from 1 April 2026 and leaves the WebSocket feed, order book, and positions open from any IP. Angel One's [SmartAPI announcement](https://smartapi.angelone.in/smartapi/forum/post/18513) limits the check to placing, modifying, and cancelling orders plus the GTT calls. [Dhan](https://dhanhq.co/docs/v2/authentication/) applies it to the Orders, Super Order, and Forever Order APIs. [Upstox](https://upstox.com/developer/api-documentation/update-app-static-ips/) ties it to order traffic. [Kotak Neo](https://www.kotakneo.com/platform/kotak-neo-trade-api/static-ip-details/) checks the place, modify, and cancel order APIs, and also needs the session created from the IP that sends the orders.

That scope is your first clue. If quotes, positions, and the order book work from the same process and only order placement fails, you are looking at the IP check. An expired token would break the other calls too.

_What an IP rejection looks like at five brokers_

| Broker               | Rejection                                                                                                                                                                                       | Reported in                                                                                                                                                                                                            |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Zerodha Kite Connect | `PermissionException` with `IP (a.b.c.d) is not allowed to place orders for this app.` The brackets hold the address Zerodha saw.                                                               | [Kite forum](https://kite.trade/forum/discussion/comment/52651/)                                                                                                                                                       |
| Upstox               | HTTP 403 on `POST /v2/order/place`, `errorCode` `UDAPI1154`, `Access to this API is blocked due to static IP restrictions.`                                                                     | [Upstox community](https://community.upstox.com/t/i-am-getting-error-udapi1154-while-placing-orders-via-api/14900)                                                                                                     |
| Dhan                 | `DH-905` with an invalid IP message                                                                                                                                                             | [Dhan support](https://dhan.co/support/platforms/dhanhq-api/i-have-added-my-static-ip-s-on-dhan-web-but-my-orders-are-getting-rejected-stating-dh-905-invalid-ip-while-placing-them-through-the-api-what-should-i-do/) |
| Angel One SmartAPI   | `AG7002`, `Access denied: Unregistered IP address. Register your IP before retrying.`                                                                                                           | [Tradetron community](https://tradetron.tech/community/t/30080)                                                                                                                                                        |
| Kotak Neo            | `stCode` `100008` with `errMsg` `unauthorized` from an IP not whitelisted. `stCode` `1037`, `session ip doesnt match with reqest ip` (Kotak's spelling), when the session came from another IP. | [Kotak Neo](https://www.kotakneo.com/platform/kotak-neo-trade-api/static-ip-details/)                                                                                                                                  |

Most of these strings come from developer forums and support pages, not from a published error reference, so match on the code and log the whole response body. Two details matter. Kite's message prints the address Zerodha saw, which is the most useful fact you can get. Dhan's `DH-905` is a generic code. The [DhanHQ annexure](https://dhanhq.co/docs/v2/annexure/) lists it as Input Exception, for missing fields and bad parameter values, so read the message before you blame the IP.

The dhanhq 2.3.0 Python SDK does not raise on an HTTP error. It returns a dict with `status` set to `failure` and the broker's code and message under `remarks`. A bot that only catches exceptions never sees the rejection. Log `remarks` on every order call. Check this against the [dhanhq release](https://pypi.org/project/dhanhq/) you run.

## Find the address the broker actually sees

Your registered IP and your egress IP are two different facts. The first is what you typed into a console. The second is the source address of the connection that reached the broker. The [Kite Connect FAQ](https://support.zerodha.com/category/trading-and-markets/general-kite/kite-api/articles/kite-connect-api-faqs) says the two must match exactly, and the other brokers behave the same way.

Run the checks on the machine that places orders, as the same user, inside the same container. A test from your laptop tells you nothing about a VPS. The [ipify](https://www.ipify.org/) endpoints make the address family explicit. `api.ipify.org` answers over IPv4 only, `api6.ipify.org` over IPv6 only, and `api64.ipify.org` over whichever family your system picks.

**Terminal**

```bash
# Your IPv4 and IPv6 egress, each forced to one family
curl -4 -s https://api.ipify.org; echo
curl -6 -s https://api6.ipify.org || echo "no IPv6 egress"; echo

# The family this host picks when both work
curl -s https://api64.ipify.org; echo

# Which order hosts publish IPv6 (AAAA) records
for h in api.kite.trade api-hft.upstox.com api.dhan.co apiconnect.angelone.in; do
  echo "$h  A: $(dig +short A "$h" | tr '\n' ' ')  AAAA: $(dig +short AAAA "$h" | tr '\n' ' ')"
done

# Through your order proxy, if you use one
curl -s --proxy "$ORDER_PROXY_URL" https://api64.ipify.org; echo
```

If your host has IPv6 egress and the broker's order host has an AAAA record, assume the order goes out over IPv6. If the broker host has only A records, the order uses IPv4.

Then read the broker's side back. Upstox returns the registered pair and when each was last changed from [GET /v2/user/ip](https://upstox.com/developer/api-documentation/get-app-static-ips/). Dhan's [GET /v2/ip/getIP](https://dhanhq.co/docs/v2/authentication/) returns `primaryIP`, `secondaryIP`, and the date each slot can next change. The Sandbox view under IP Setup in Dhan Web adds the Detected IP and an Orders Allowed Status, per [Dhan support](https://dhan.co/support/platforms/dhanhq-api/i-have-added-my-static-ip-s-on-dhan-web-but-my-orders-are-getting-rejected-stating-dh-905-invalid-ip-while-placing-them-through-the-api-what-should-i-do/). Zerodha documents no lookup call, but its rejection names the IP it saw, and Zerodha staff suggested [testing with an AMO order](https://kite.trade/forum/discussion/comment/52155). Cancel the AMO before the market opens.

**Terminal**

```bash
# Upstox: the registered pair and when each was last updated
curl -s https://api.upstox.com/v2/user/ip \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $UPSTOX_ACCESS_TOKEN"

# Dhan: the registered pair and when each slot can next change
curl -s https://api.dhan.co/v2/ip/getIP \
  -H "Accept: application/json" \
  -H "access-token: $DHAN_ACCESS_TOKEN"
```

## IPv6 is leaving instead of IPv4

This is the usual cause when the IP looks right. Your server has a static IPv4 address, you registered it, and the operating system connects over IPv6 anyway. The default address selection table in glibc, shown in the [gai.conf man page](https://man7.org/linux/man-pages/man5/gai.conf.5.html), gives IPv4-mapped addresses (`::ffff:0:0/96`) precedence 10, the lowest in the table. A dual-stack host therefore tries IPv6 first whenever the broker host publishes an AAAA record.

Zerodha's [FAQ](https://support.zerodha.com/category/trading-and-markets/general-kite/kite-api/articles/kite-connect-api-faqs) names this exact case. Requests that go out over IPv6 while only the IPv4 address is whitelisted are rejected. Kite staff [added](https://kite.trade/forum/discussion/comment/52155) that the choice is not controlled at the KiteConnect library or SDK level. Dhan users [reported](https://madefortrade.in/t/ip-is-invalid-though-my-secondary-ip-is-valid/63507) the same failure, plus a second trap. Dhan stored one user's IPv6 address in its long form, the detected address arrived in compressed form, and the two did not match. Angel One's [announcement](https://smartapi.angelone.in/smartapi/forum/post/18513) and [Kotak Neo](https://www.kotakneo.com/platform/kotak-neo-trade-api/static-ip-details/) support only IPv4 static IPs for now.

You have two fixes. Register the IPv6 address as well, if your broker accepts it and the address is static. Kite, Upstox, and Dhan say they accept both families. Or make the order client use IPv4 only. The second works at every broker and is easier to reason about.

**Python (requests)**

```python
import socket

import urllib3.util.connection as urllib3_connection

# requests uses urllib3, and urllib3 calls this function on every new
# connection to pick the address family. Returning AF_INET makes
# getaddrinfo() return IPv4 addresses only. Run it before the first request.
urllib3_connection.allowed_gai_family = lambda: socket.AF_INET
```

**Node.js (undici)**

```javascript
// npm install undici
import { Agent, fetch } from "undici";

// undici passes connect options through to net.connect() and tls.connect(),
// so family: 4 restricts the DNS lookup to IPv4.
const ipv4Only = new Agent({ connect: { family: 4 } });

const res = await fetch("https://api64.ipify.org", { dispatcher: ipv4Only });
console.log(await res.text()); // an IPv4 address
```

**Linux (whole host)**

```bash
# Give IPv4-mapped addresses the highest precedence for getaddrinfo().
# This changes address order for every program on the host.
echo 'precedence ::ffff:0:0/96  100' | sudo tee -a /etc/gai.conf

# IPv4 addresses should now be listed first
getent ahosts api.kite.trade | head -3
```

The gai.conf change has a catch. The man page notes that a single precedence line replaces the whole default table, so test it on a staging host first. If your orders go through a proxy, none of this matters for the broker. The broker sees the proxy's egress address, whichever family your bot used to reach the proxy. For dual-stack behaviour on AWS and GCP, see [IPv6 egress and IPv4-only allowlists](https://fixedmark.com/blog/ipv6-egress-and-ipv4-only-allowlists).

## The outbound IP drifted

A setup that worked for weeks and then failed at 9:15 one morning usually means the egress IP changed. These are the common reasons.

- Home broadband. Most residential connections get a dynamic address that can change after a router restart, and some ISPs put home users behind carrier-grade NAT. See [home static IP vs VPS vs proxy](https://fixedmark.com/blog/home-static-ip-vs-vps-vs-proxy-for-algo-trading) for the INR costs of each fix.
- A cloud VM without a reserved address. On AWS, the auto-assigned public IPv4 address is released when the instance is stopped, hibernated, or terminated, and a new one is assigned on start ([AWS docs](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html)). An Elastic IP stays with you.
- Serverless functions and PaaS containers. They leave from shared address pools that change. See [why serverless egress IPs change](https://fixedmark.com/blog/why-serverless-egress-ips-change) and [algo trading on serverless](https://fixedmark.com/blog/algo-trading-on-serverless-with-a-static-ip).
- More egress addresses than slots. A NAT gateway with three addresses, or a platform that publishes a list of outbound IPs, cannot fit in two broker slots. Any new connection can leave from an address you did not register.
- A VPN or network change. If orders go through a VPN, the VPN's exit address is the one that counts.

First make the address stable. Then make the bot prove it before it trades. A startup check costs one request and turns a morning of rejected orders into one clear log line.

**egress_guard.py**

```python
import ipaddress
import os
import sys

import requests

# Comma-separated, as registered with the broker: "203.0.113.10,203.0.113.11"
REGISTERED = {
    ipaddress.ip_address(s.strip())
    for s in os.environ["BROKER_REGISTERED_IPS"].split(",")
    if s.strip()
}

# Use exactly the proxy settings the order client uses, or None for direct.
proxy = os.environ.get("ORDER_PROXY_URL")
PROXIES = {"http": proxy, "https": proxy} if proxy else None

def egress_ip() -> ipaddress.IPv4Address | ipaddress.IPv6Address:
    res = requests.get("https://api64.ipify.org", proxies=PROXIES, timeout=10)
    res.raise_for_status()
    return ipaddress.ip_address(res.text.strip())

ip = egress_ip()
if ip not in REGISTERED:
    sys.exit(f"egress IP {ip} is not registered with the broker, refusing to trade")
print(f"egress IP {ip} matches a registered address")
```

The guard compares parsed addresses, so a compressed and an expanded IPv6 address count as equal, and stray spaces do not cause a false alarm. Run it at startup and before the first order of each session. If it fails, exit. Do not trade and hope.

One limit applies. Without a proxy, `api64.ipify.org` shows the family your host picks for ipify, which can differ from the family it picks for the broker. Pair the guard with the IPv4-only client setting above, and the result holds for both.

## The right IP in the wrong slot or account

Each broker scopes the registration differently, and a correct address in the wrong place still fails.

_Where each broker keeps the IPs, and what to do after a change_

| Broker               | Where the IPs belong                                                                                                                                                                                   | Change limit                           | After a change                                                                                                                                                                                                                                                                           |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Zerodha Kite Connect | The developer account profile, shared by every app under it ( [FAQ](https://support.zerodha.com/category/trading-and-markets/general-kite/kite-api/articles/kite-connect-api-faqs) )                   | Once per calendar week                 | Updates take effect immediately, per the FAQ                                                                                                                                                                                                                                             |
| Upstox               | Your user account, whichever OAuth client issued the token ( [docs](https://upstox.com/developer/api-documentation/update-app-static-ips/) )                                                           | Once per calendar week, or `UDAPI1185` | Existing access tokens are invalidated, so generate a new one                                                                                                                                                                                                                            |
| Dhan                 | Your account, as a `PRIMARY` or `SECONDARY` `ipFlag` ( [docs](https://dhanhq.co/docs/v2/authentication/) )                                                                                             | Once every 7 days                      | Regenerate the access token if you added the IPs after creating it ( [support](https://dhan.co/support/platforms/dhanhq-api/i-have-added-my-static-ip-s-on-dhan-web-but-my-orders-are-getting-rejected-stating-dh-905-invalid-ip-while-placing-them-through-the-api-what-should-i-do/) ) |
| Angel One SmartAPI   | The app you create with Add App ( [Angel One](https://www.angelone.in/news/market-updates/what-s-changing-in-angel-one-s-smartapi-access-from-april-1-2026) ). An IP already on another app is refused | Once per calendar week                 | Not documented. Ask SmartAPI support which API key to use                                                                                                                                                                                                                                |
| Kotak Neo            | Your Trade API application, primary and secondary ( [Kotak Neo](https://www.kotakneo.com/platform/kotak-neo-trade-api/static-ip-details/) )                                                            | Once every 7 days                      | Create a new session from the IP that sends the orders                                                                                                                                                                                                                                   |

These patterns cause most of the trouble.

- You changed the IP and kept the old token. On Upstox the old token stops working after the update. On Dhan, a token generated before the IPs were added should be regenerated.
- The right address sits in the secondary slot and a typo sits in the primary. In one [Dhan thread](https://madefortrade.in/t/ip-is-invalid-though-my-secondary-ip-is-valid/63507), getIP reported `SECONDARY_MATCH` with orders allowed, so a secondary match was enough there. The primary still cannot change for 7 days.
- The address is registered on another account. A user on the [SmartAPI forum](https://smartapi.angelone.in/smartapi/forum/post/18513) got `Primary Static IP is already associated with another app` when registering the same IP for a family member's account. Kite lets a spouse, dependent children, and dependent parents share one address through one developer account ([Zerodha](https://support.zerodha.com/category/trading-and-markets/general-kite/kite-api/articles/static-ip)), and warns that sharing outside the family can suspend the account ([FAQ](https://support.zerodha.com/category/trading-and-markets/general-kite/kite-api/articles/kite-connect-api-faqs)).
- Both slots hold the same address. Upstox rejects that with `UDAPI1184` ([docs](https://upstox.com/developer/api-documentation/update-app-static-ips/)). Other brokers may accept it, but you lose the failover the second slot exists for. See [why brokers ask for a primary and secondary IP](https://fixedmark.com/blog/why-brokers-ask-for-primary-and-secondary-ip).

Check the address twice before you save. A typo costs you a week.

## The proxy is set, but not on the order client

Routing orders through a proxy or fixed-IP gateway adds a new way to fail. The proxy works in your shell, the echo test passes, and orders still arrive from the server's own address. Almost always, the HTTP client that sends the order never saw the proxy settings.

- The variable lives in your shell, not the service. An `export HTTPS_PROXY=...` in `.bashrc` does not reach a systemd unit, a cron job, or a Docker container. Set it in the unit's `Environment=` line, the crontab, or the container's environment.
- `NO_PROXY` matches the broker host. A broad entry such as `.com`, or a list copied from another project, sends broker traffic direct. See [NO_PROXY and per-client agents](https://fixedmark.com/blog/selective-proxying-no-proxy-and-per-client-agents).
- Orders use a different host from data. Upstox's v3 place order call goes to `api-hft.upstox.com` ([docs](https://upstox.com/developer/api-documentation/v3/place-order/)), not `api.upstox.com`. A per-host proxy rule that names only one of them proxies your quotes and sends orders direct.
- The SDK has its own session. Proxy settings on your own `requests.Session` do nothing for the SDK's session. And the [requests docs](https://requests.readthedocs.io/en/latest/user/advanced/#proxies) warn that `session.proxies` can be overwritten by environment proxies. Passing `proxies=` on each request avoids that.
- The SDK takes a proxy URL but drops the credentials. The Upstox Python SDK passes `Configuration.proxy` to urllib3's `ProxyManager` with no proxy headers ([source](https://raw.githubusercontent.com/upstox/upstox-python/master/upstox_client/rest.py)), and urllib3 does not turn `user:pass@` in the URL into a `Proxy-Authorization` header. An authenticated proxy then answers 407. Call the order endpoint with `requests` instead, which does send those credentials.

The safest pattern is to hand the proxy to the order client explicitly. The Kite and SmartAPI Python SDKs accept a `proxies` dict and pass it to every request ([pykiteconnect](https://raw.githubusercontent.com/zerodha/pykiteconnect/master/kiteconnect/connect.py), [smartapi-python](https://raw.githubusercontent.com/angel-one/smartapi-python/main/SmartApi/smartConnect.py)). dhanhq 2.3.0 has no proxy option, but it sends through a plain `requests.Session`, so it honours `HTTPS_PROXY`.

**Kite Connect**

```python
# pip install kiteconnect
import os

from kiteconnect import KiteConnect

proxy = os.environ["ORDER_PROXY_URL"]
kite = KiteConnect(
    api_key=os.environ["KITE_API_KEY"],
    access_token=os.environ["KITE_ACCESS_TOKEN"],
    proxies={"http": proxy, "https": proxy},  # used on every request
)

order_id = kite.place_order(
    variety=kite.VARIETY_REGULAR,
    exchange=kite.EXCHANGE_NSE,
    tradingsymbol="INFY",
    transaction_type=kite.TRANSACTION_TYPE_BUY,
    quantity=1,
    product=kite.PRODUCT_CNC,
    order_type=kite.ORDER_TYPE_LIMIT,
    price=1400.0,
)
print(order_id)
```

**SmartAPI**

```python
# pip install smartapi-python pyotp
import os

import pyotp
from SmartApi import SmartConnect

proxy = os.environ["ORDER_PROXY_URL"]
smart = SmartConnect(
    api_key=os.environ["SMARTAPI_KEY"],
    proxies={"http": proxy, "https": proxy},
)

# Login and every later call, placeOrder included, use the proxy.
smart.generateSession(
    os.environ["SMARTAPI_CLIENT_CODE"],
    os.environ["SMARTAPI_PIN"],
    pyotp.TOTP(os.environ["SMARTAPI_TOTP_SECRET"]).now(),
)
```

**Dhan**

```bash
# dhanhq documents no proxy option, but its requests.Session reads the
# standard variables. Set this where the bot runs, not only in your shell.
export HTTPS_PROXY="$ORDER_PROXY_URL"
python bot.py
```

The SmartAPI Python SDK also sends `X-ClientPublicIP` and `X-ClientLocalIP` headers. In the current source those values are hard-coded. They do not change the address your connection comes from, so editing them fixes nothing.

If the proxy itself refuses the call, with a 407, a 403 from the proxy, or a 502 on CONNECT, that is a different failure. See [proxy error codes explained](https://fixedmark.com/blog/proxy-error-codes-explained).

## A checklist before you open a ticket

1. 1

   **Capture the full error** Log the HTTP status, the broker's error code, the message, and the time in IST.
2. 2

   **Print the egress IP from the order process** Check IPv4 and IPv6 separately, and through the proxy if the order client uses one.
3. 3

   **Read the registered IPs back from the broker** Use Upstox `GET /v2/user/ip`, Dhan `getIP` or its Sandbox view, or the profile page of the Kite developer console.
4. 4

   **Compare parsed addresses** Do not compare strings. IPv6 compression and stray spaces both cause false mismatches.
5. 5

   **Regenerate the token after any IP change** Upstox invalidates the old token. Dhan asks for a new one if you added the IPs after creating it. Kotak Neo needs a new session.
6. 6

   **Prove the order client uses the proxy** Run the egress check with the same proxies dict or environment the SDK uses.
7. 7

   **Send the broker four facts** The error body, the egress IP you measured, the registered IPs, and the time of the rejection.

## Doing this with Fixedmark

Fixedmark is one way to get the stable IPv4 egress this guide keeps asking for. It is in early access. The planned India Trader plan gives you a dedicated pair of IPv4 addresses in Mumbai. See [planned India pricing](https://fixedmark.com/india/algo-trading-static-ip). You register the two addresses as primary and secondary and send order calls through one proxy URL. The broker sees one of your two addresses wherever the bot runs. Each new connection can leave from either one, so register both. Fixedmark egress is IPv4, so the IPv6 trap above does not apply to proxied calls.

Two features map onto the checklist. [Verify egress IP](https://fixedmark.com/docs/verify-egress-ip) is the echo test, run through the proxy. [Connection logs](https://fixedmark.com/docs/logs) record the destination, SNI, egress IP, and result of each connection, so you can see whether an order call reached the proxy at all and which address it left from. If you lock a token to its hosts with a [destination allowlist](https://fixedmark.com/docs/allowlists), name every order host, such as `api-hft.upstox.com:443` for Upstox. A missing host shows up in the logs as `denied_by_policy`.

Use a dedicated pair. The trial and Starter plans share their pair with other customers, which does not fit the family-only sharing rule. The [broker guides](https://fixedmark.com/docs/brokers) cover each console step by step for [Zerodha](https://fixedmark.com/docs/brokers/zerodha), [Upstox](https://fixedmark.com/docs/brokers/upstox), [Dhan](https://fixedmark.com/docs/brokers/dhan), [Angel One](https://fixedmark.com/docs/brokers/angel-one), and [Kotak Neo](https://fixedmark.com/docs/brokers/kotak-neo). Kotak Neo needs the session created from the IP that sends the orders, so ask [Fixedmark support](https://fixedmark.com/docs/support) before you rely on the pair with Kotak Neo. Confirm with your broker that it accepts a cloud IP before you depend on one.

## Sources

Checked November 2026. Confirm current details on the vendor's site before you decide. Prices and limits change.

- [Zerodha support: Kite Connect API FAQs](https://support.zerodha.com/category/trading-and-markets/general-kite/kite-api/articles/kite-connect-api-faqs)
- [Zerodha support: static IP for Kite Connect](https://support.zerodha.com/category/trading-and-markets/general-kite/kite-api/articles/static-ip)
- [Kite forum: place_order rejected, IP not allowed for this app](https://kite.trade/forum/discussion/comment/52651/)
- [Kite forum: preparing for SEBI's retail algo rules](https://kite.trade/forum/discussion/comment/52155)
- [Upstox community: error UDAPI1154 while placing orders](https://community.upstox.com/t/i-am-getting-error-udapi1154-while-placing-orders-via-api/14900)
- [Upstox docs: Update Static IPs](https://upstox.com/developer/api-documentation/update-app-static-ips/)
- [Upstox docs: Get Static IPs](https://upstox.com/developer/api-documentation/get-app-static-ips/)
- [Upstox docs: Place Order V3](https://upstox.com/developer/api-documentation/v3/place-order/)
- [Upstox Python SDK: rest.py proxy handling](https://raw.githubusercontent.com/upstox/upstox-python/master/upstox_client/rest.py)
- [Dhan support: orders rejected with DH-905 invalid IP](https://dhan.co/support/platforms/dhanhq-api/i-have-added-my-static-ip-s-on-dhan-web-but-my-orders-are-getting-rejected-stating-dh-905-invalid-ip-while-placing-them-through-the-api-what-should-i-do/)
- [DhanHQ docs: authentication and static IP](https://dhanhq.co/docs/v2/authentication/)
- [DhanHQ docs: annexure and error codes](https://dhanhq.co/docs/v2/annexure/)
- [MadeForTrade: IP invalid though secondary IP is valid](https://madefortrade.in/t/ip-is-invalid-though-my-secondary-ip-is-valid/63507)
- [PyPI: dhanhq](https://pypi.org/project/dhanhq/)
- [Tradetron community: Angel One static IP and error AG7002](https://tradetron.tech/community/t/30080)
- [SmartAPI forum: updates in compliance with SEBI guidelines](https://smartapi.angelone.in/smartapi/forum/post/18513)
- [Angel One: SmartAPI access changes from April 1, 2026](https://www.angelone.in/news/market-updates/what-s-changing-in-angel-one-s-smartapi-access-from-april-1-2026)
- [smartapi-python: smartConnect.py](https://raw.githubusercontent.com/angel-one/smartapi-python/main/SmartApi/smartConnect.py)
- [Kotak Neo: static IP details for the Trade API](https://www.kotakneo.com/platform/kotak-neo-trade-api/static-ip-details/)
- [pykiteconnect: connect.py](https://raw.githubusercontent.com/zerodha/pykiteconnect/master/kiteconnect/connect.py)
- [AWS: Amazon EC2 instance IP addressing](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html)
- [man7.org: gai.conf(5)](https://man7.org/linux/man-pages/man5/gai.conf.5.html)
- [Requests: advanced usage, proxies](https://requests.readthedocs.io/en/latest/user/advanced/#proxies)
- [ipify: IP address API](https://www.ipify.org/)

Keep reading

## Related guides

- [Guide Static IP for algo trading A dedicated Mumbai IPv4 pair for your broker's primary and secondary slots.](https://fixedmark.com/india/algo-trading-static-ip)
- [Tool What's my IP See the address and family your browser connects from.](https://fixedmark.com/tools/whats-my-ip)
- [Integration AWS Lambda A fixed IP for Lambda without VPC, subnets, and two NAT Gateways.](https://fixedmark.com/integrations/aws-lambda)
- [Integration Railway A dedicated IP pair for Railway services when shared static IPs are not enough.](https://fixedmark.com/integrations/railway)
- [Use case Partner API allowlisting Give Salesforce, SOAP vendors, and payment gateways one dedicated IP pair to allowlist, wherever your code runs.](https://fixedmark.com/use-cases/partner-api-allowlisting)

## Frequently asked questions

### Why do quotes work but orders get rejected for my IP?

Brokers check the source IP on order calls. Zerodha, Angel One, and Dhan document that market data and order or trade lookups work from any IP, and Upstox ties the check to order placement. A working quote call proves your token is fine, not that your IP is registered.

### Can I register an IPv6 address instead of IPv4?

Kite Connect, Upstox, and Dhan say they accept both families. Angel One SmartAPI and Kotak Neo support only IPv4 static IPs for now. An IPv6 address helps only if it is static, and the broker must store it in a form that matches what it detects.

### I registered a typo and cannot change it for a week. What can I do?

If the secondary slot is empty, put the correct address there. Dhan tracks a separate modify date per slot, and a secondary match allows orders. On other brokers, ask support whether filling the second slot counts as your weekly change.

### Will a VPN fix IP not whitelisted errors?

Only if its exit address is static and used by you or your immediate family alone. Commercial VPN exits are shared by many users, and Zerodha warns that sharing an IP outside the family can lead to suspension of the account.

### How soon after updating the IP can I place orders?

Zerodha says updates take effect immediately. Upstox invalidates your access tokens on update, so generate a new one first. Dhan asks you to regenerate the token if you added the IPs after creating it.
