If you are developing an automated trading system using the Zerodha API, one of the most important infrastructure requirements is ensuring that all API orders originate from a static, whitelisted IP address. This is becoming the standard in the Indian retail algorithmic trading ecosystem to ensure traceability and prevent misuse. Below is a clear step-by-step guide tailored for live algorithmic deployment.
Obtain a Static Public IPv4 Address
First, you need access to a public static IP — an IP that never changes. You can obtain it in one of two ways:
Deployment choice How to get static IP Notes
Home/office trading PC/server Ask your ISP for a static IPv4 plan Usually requires a business connection
Cloud server (recommended) Create a VM and allocate a reserved/static IP Provides higher uptime and better latency stability
Whether you run your strategy locally or on the cloud, ensure that the network environment does not rotate or refresh your public IP.
Ensure All API Requests Leave Through the Static IP
After acquiring the static IP, your trading application must run from the machine or server associated with that IP. All outbound API traffic — login, quote fetch, order flow — must originate from that IP alone.
Things to avoid:
Changing internet connections
Using VPNs or proxies that alter the public IP
Switching between Wi-Fi, mobile hotspot, and broadband
Your program should run consistently from the same network so that the public IP your API calls carry remains constant.
Register the Static IP With Zerodha
Once you have the static public IP, you’ll need to register or map that IP to your Kite Connect API key. This step binds that particular IP to the API credentials so that only requests originating from the approved IP can place orders.
Important points:
Only the registered IP will be authorised for API-based trading.
If you have more than one trading server, request whitelisting of a backup IP, if supported.
If you change servers or broadband providers in the future, you must update the static IP mapping before trading live.
Until the static IP is registered and enabled, order requests may get rejected for security reasons.
Test your API-Based Trading from the Static IP
After IP whitelisting is approved, run your trading engine from the same machine/server and test everything fully.
Checklist to validate:
Login API flow works
WebSocket/network streams are stable
Orders are accepted without rejections
API exceptions are properly logged by your code
You want to detect IP-related or authentication-related failures at the testing stage, not during live trades.
Maintain Documentation and a Backup Plan
Because you’re deploying a live algo strategy, treating infrastructure like production is essential.
Recommendations:
Document the static IP, date of registration, and associated API key
If you change server or ISP, update the static IP before attempting order placement
Maintain access to a standby machine or cloud server with a secondary static IP if you need redundancy
Monitor your server’s public IP occasionally to ensure it hasn’t changed due to any configuration shift
A static IP does not improve profits by itself, but it is critical for a reliable and compliant live trading setup. Your real-time model, LTP/volume ingestion pipeline, and order execution logic will all function more safely when your infrastructure is stable, traceable, and authorised.