Fix Upstox "Static IP Restriction" Block on Your Cloud Bot

QuotaGuard Engineering
April 2, 2026
5 min read
Pattern

Route your Upstox API calls through QuotaGuard Shield's dedicated static IP, register it with Upstox, and the "static IP restriction" block disappears. Under an hour on any cloud platform.

If you're seeing "Access to this API is blocked due to static IP restrictions" starting April 1, 2026, your credentials are fine. Your code is fine. The problem is your outbound IP address. SEBI's static IP mandate for retail algo trading took effect on April 1 and Upstox is now enforcing it. Full regulatory background here.

On April 2, 2026 we tested QuotaGuard Shield's AWS static IP (52.33.116.20, us-west-2) against api.upstox.com through the proxy. Result: 401 Unauthorized. That's the correct response. The connection reached Upstox's servers. No network-layer block. Cloudflare didn't stop the request. Upstox's own mandate announcement lists AWS as an acceptable IP source. QuotaGuard Shield runs on AWS. You're on the same network.

Get a Static IP With QuotaGuard Shield

QuotaGuard Shield is a static IP egress proxy on AWS. Your app stays on Heroku or Railway. Your Upstox API calls route through Shield's dedicated IP. Upstox sees that IP. You register it once. It never changes.

Shield uses SSL passthrough. Your Upstox credentials and order data are never decrypted by the proxy. It's a blind conduit between your app and Upstox's servers. Each account gets a dedicated IP, not a shared pool. SEBI requires the IP to be traceable to you specifically. A shared proxy fails that test.

QuotaGuard tip: the same static IP works across all brokers. If you're also running strategies through Zerodha, Kotak Neo, or Dhan, one QuotaGuard Shield subscription covers all of them.

Setup

Sign up at quotaguard.com/products/pricing. Your proxy URL and dedicated static IP are in the dashboard immediately. Set the environment variable on your platform (Railway, Render, Fly.io, EC2, or anything else):

QUOTAGUARDSHIELD_URL=http://username:password@proxy.quotaguard.com:9293

If you're on Heroku, Shield is also available as an add-on: heroku addons:create quotaguardshield:starter. It sets the environment variable automatically. Same product, different billing path.

Python: requests Library

import os
import requests
 
proxy_url = os.environ['QUOTAGUARDSHIELD_URL']
 
proxies = {
    'http': proxy_url,
    'https': proxy_url,
}
 
response = requests.get(
    'https://api.upstox.com/v2/user/profile',
    headers={'Authorization': f'Bearer {access_token}'},
    proxies=proxies,
)
print(response.status_code)

Python: upstox-python-sdk

The official SDK uses urllib3 under the hood. Set proxy environment variables before the SDK imports:

import os
 
proxy_url = os.environ['QUOTAGUARDSHIELD_URL']
os.environ['HTTPS_PROXY'] = proxy_url
os.environ['HTTP_PROXY'] = proxy_url
 
import upstox_client
 
configuration = upstox_client.Configuration()
configuration.access_token = access_token
 
api_instance = upstox_client.UserApi(upstox_client.ApiClient(configuration))
profile = api_instance.get_profile('2.0')

Python: requests.Session (For Multiple Calls)

If you're managing your Upstox calls through a session object:

import os
import requests
 
session = requests.Session()
proxy_url = os.environ['QUOTAGUARDSHIELD_URL']
session.proxies.update({'http': proxy_url, 'https': proxy_url})
 
response = session.get(
    'https://api.upstox.com/v2/order/retrieve-all',
    headers={'Authorization': f'Bearer {access_token}'},
)

Register the IP With Upstox

Find your static IP in the QuotaGuard dashboard. Follow Upstox's static IP setup guide on their developer forum. Registration is in the Upstox API portal under your account settings.

Run a single test request before going back to production. Confirm the response is 200, not a block. Then deploy.

Latency Won't Affect Your Strategy

Shield adds roughly 10-50ms per request. The SEBI mandate is an authentication requirement, not an execution speed requirement. The IP check happens at session establishment, not on every order. If you're deploying to a PaaS cloud platform, you're running daily, hourly, or minute-level strategies. The proxy latency is irrelevant to your P&L.

Get Your Upstox Bot Back Online

Sign up at quotaguard.com/products/pricing. Get your static IP. Register it with Upstox. Under an hour. Start with Starter to test, move to Production ($49/month) when you're live. Also available as a Heroku add-on.

QuotaGuard Static IP Blog

Practical notes on routing cloud and AI traffic through Static IPs.

Reliability Engineered for the Modern Cloud

For over a decade, QuotaGuard has provided reliable, high-performance static IP and proxy solutions for cloud environments like Heroku, Kubernetes, and AWS.

Get the fixed identity and security your application needs today.