Static IP for the Upstox API

Since 1 April 2026, Upstox rejects order requests that don't come from the static IP registered on your developer app. You need one fixed public IP that only you use, added under My Apps, with your order calls sent through it. Upstox accepts IPv4 and IPv6. One catch: the Python SDK drops a proxy username and password written into the proxy URL, so the setup below sends them as a header.

Last checked against the broker's own docs on 31 October 2026

What Upstox checks

From Upstox's developer announcement on the algo trading circular:

IPv4 or IPv6 for Upstox

IPv6 works. Upstox accepts IPv6 addresses, and its API host api.upstox.com has an IPv6 address, so a dedicated IPv6 at ₹50 a month is enough for orders. The market data feed URL is handed to you at runtime and isn't IP checked, so you can keep the feed on your normal connection.

How to register your IP with Upstox

  1. Get your fixed IP's proxy details: host, port, username and password.
  2. Check the exact exit address: curl -x http://USER:PASS@HOST:PORT https://ifconfig.co
  3. In the Upstox developer portal, open your app under My Apps and add the address as your static IP.
  4. Generate a fresh access token, because the change invalidated the old one.

Send Upstox orders through the fixed IP

The official upstox-python-sdk uses urllib3, not requests, so the HTTPS_PROXY environment variable alone won't route it. You set config.proxy. In our testing (SDK 2.30.0, urllib3 2.6), a username and password inside that URL are not sent to the proxy, so an authenticated proxy answers 407. Put only host and port in the URL and add the login as a proxy header:

import urllib3
import upstox_client

config = upstox_client.Configuration()
config.access_token = "YOUR_ACCESS_TOKEN"
config.proxy = "http://HOST:PORT"  # host and port only

client = upstox_client.ApiClient(config)
# send the proxy login as a header, before the first request
client.rest_client.pool_manager.proxy_headers.update(
    urllib3.make_headers(proxy_basic_auth="USER:PASS")
)
order_api = upstox_client.OrderApi(client)

Use the same client for every API class (UserApi, OrderApi and so on). A second ApiClient created without the proxy goes direct and its orders get rejected. The full Upstox proxy guide on GitHub covers reading the proxy from an environment variable, a sample order and a verification script.

Common Upstox errors

For a step-by-step check of IP errors, see how to fix "IP not whitelisted" errors.

Upstox static IP: FAQs

Does Upstox accept IPv6 for API orders?

Yes. Upstox's announcement says both IPv4 and IPv6 notation are accepted, and its API host is reachable over IPv6. Register the exact address your orders leave from.

Why do I get 407 with the Upstox Python SDK?

The SDK builds a urllib3 proxy manager, and urllib3 doesn't send a username and password written into the proxy URL. Set config.proxy to host and port only, and add the login with urllib3.make_headers(proxy_basic_auth=...) on the client's pool manager before the first request.

How often can I change my Upstox static IP?

Once per calendar week. Each change invalidates your access tokens, so plan to log in again after it.

Which TrueIP plan should I take for Upstox?

A dedicated IPv6 at ₹50 a month plus GST. Take IPv4 at ₹200 a month only if you also need one address for an IPv4-only broker.

Sources

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

Other brokers

Zerodha Kite Connect

Zerodha Kite Connect accepts API orders only from a whitelisted IP. The rules, IPv4 or IPv6, where to add the IP, and Python code to route orders through it.

Angel One SmartAPI

Angel One SmartAPI accepts orders only from your registered static IP, and only IPv4 for now. The rules, how to register the IP, and the Python setup.

Fyers API

Fyers accepts API orders only from the static IP on your Algo trading app. How the new app works, IPv4 or IPv6, and the Python setup for fyers-apiv3.

Flattrade Pi API

Flattrade needs a static IP to create an API key, and both the token and orders must come from it. The rules, IPv4 or IPv6, and the NorenRestApiPy proxy setup.