Static IP for the Samco Trade API

Samco accepts order placement and modification only from an IPv4 address whitelisted on your Samco API app. You get a primary and an optional secondary IP, and one change every 7 days across your whole account. IPv6 isn't accepted, so you need a dedicated IPv4.

Last checked against the broker's own docs on 13 November 2026

What Samco checks

Watch out for IPv6 on the way out

Samco's API host publishes IPv6 addresses even though only IPv4 can be whitelisted. A connection that leaves over IPv6 gets a 403. A TrueIP IPv4 proxy connects out over IPv4 only, so Samco always sees the address you registered.

How to register your IP

  1. Get a dedicated IPv4 and check its exit address: curl -x http://USER:PASS@HOST:PORT https://ifconfig.co
  2. In the Samco Trade API dashboard, open Static IPs, Add IP, choose your app and PRIMARY, enter the address and confirm with the OTP.
  3. Check it with Samco's GET /ip/whoami, which shows the IP Samco sees without using up your weekly change.

Send Samco orders through the fixed IP

Samco's SDK, stocknotebridge, uses urllib3 and ignores proxy environment variables, so give it a proxy-aware pool:

import os, certifi, urllib3
from snapi_py_client.api_client import ApiClient
from snapi_py_client.snapi_bridge import StocknoteAPIPythonBridge

api = ApiClient()
api.rest_client.pool_manager = urllib3.ProxyManager(
    proxy_url=os.environ["PROXY_HOSTPORT"],  # http://HOST:PORT
    proxy_headers=urllib3.make_headers(proxy_basic_auth=os.environ["PROXY_AUTH"]),  # USER:PASS
    cert_reqs="CERT_REQUIRED", ca_certs=certifi.where(),
)
samco = StocknoteAPIPythonBridge(api_client=api)

The full Samco proxy guide on GitHub covers login, streaming and troubleshooting.

Getting 403s? See fixing "The IP is not the registered static IP".

Samco static IP: FAQs

Does Samco accept IPv6 for API whitelisting?

No. Samco's docs say both IPs must be valid public IPv4 addresses.

How often can I change my Samco static IP?

Once every 7 days from your last change, counted across your whole Samco account. Deleting an IP counts as a change.

Can I use a shared static IP with Samco?

No. Samco rejects an IP that's already registered to another Samco client. You need an IP that only you use.

Sources

Get your dedicated static IP

IPv6 ₹50 a month, IPv4 ₹200 a month, plus GST. Live in minutes, whitelisted once.

Get IPv4 · ₹200/mo + GSTGet IPv6 · ₹50/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.

Upstox API

Upstox accepts API orders only from your registered static IP. The rules, IPv4 or IPv6, where to add the IP, and the Python SDK setup that avoids 407 errors.

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.

Dhan (DhanHQ)

Dhan accepts API orders only from your registered static IP, IPv4 or IPv6. Where to add it, the 7-day change rule, DH-905 errors and Python setup.

All 10 brokers