← Back to Blog
Broker Integration

Broker-Specific Proxy Setup

Copy-paste Python proxy code for the five most common Indian brokers - Zerodha, Fyers, Angel One, Dhan, and Upstox - each using whichever method its SDK actually supports.

Updated Aug 2026 · 6 min read

Every example below builds a proxy URL from your staticip_userid / staticip_password (from your dashboard) and either passes it directly to the SDK or sets it via environment variables, depending on what that SDK supports. If you want to understand the underlying pattern itself (or you're using a broker not listed here), start with our generic Python proxy setup guide first - this page assumes you've already seen that.

Broker-specific examples

Zerodha Kite Connect

kiteconnect.KiteConnect accepts a proxies dict directly in its constructor, so no environment-variable trick is needed:

zerodha_kite_proxy.py
from kiteconnect import KiteConnect

API_KEY = "your_api_key"
API_SECRET = "your_secret_key"
REQUEST_TOKEN = "request_token_received_from_redirect_url"
# Login URL: https://kite.trade/connect/login?api_key={API_KEY}&v=3

# Your StaticIP.in credentials (from your dashboard) - separate from the
# Kite API_KEY/API_SECRET above, don't mix the two up
STATICIP_USERID = "your_staticip_userid"
STATICIP_PASSWORD = "your_staticip_password"
STATICIP_HOSTNAME = "your-assigned-host.staticip.in"  # from your dashboard - hostname OR raw IP both work

proxy_url = f"https://{STATICIP_USERID}:{STATICIP_PASSWORD}@{STATICIP_HOSTNAME}"
proxy_cred = {"https": proxy_url}

kite = KiteConnect(api_key=API_KEY, proxies=proxy_cred)

try:
    session_data = kite.generate_session(REQUEST_TOKEN, api_secret=API_SECRET)
    kite.set_access_token(session_data["access_token"])
    print(f"User profile: {kite.profile()}")
except Exception as e:
    print(f"Error occurred: {e}")

Whitelist the static IP shown in your dashboard under Kite Connect → your app → API settings, and every order placed through kite above will originate from it.

Using a different broker or platform?

Any of the 200+ brokers/platforms we support work the same way - if their SDK accepts a proxies parameter, pass it directly like the Zerodha/Angel One examples; if not, the environment-variable trick used above for Fyers/Dhan works with virtually any requests-based library. Stuck on a specific one? message us or ping +91 94706 69031 on WhatsApp and we'll help you wire it up.

Don't have a static IP yet?

SEBI-compliant IPv4/IPv6 from ₹100/month. Whitelist-ready in minutes.