Documentation · v1
Route your broker traffic through a
dedicated IPv6.
Everything you need to whitelist, patch and run — from the SOCKS5 three-line snippet to the programmatic /api/v1 that lets a bot log in, mint a token and proxy orders without touching your machine's default IP.
Quick start
Five steps, roughly ten minutes end to end.
- 1
Sign in with Google
Land on servloci.in and hit Sign in. We use OAuth so there's nothing to remember.
- 2
Open Enable with broker
From the portal guide, choose the broker route, confirm compatibility and complete the whitelist flow without sharing broker secrets in docs forms.
- 3
Pay ₹125 to lock a trial IPv6
Razorpay Checkout opens. Card, UPI or netbanking. Once the payment lands, a real IPv6 is bound to your account for 14 days. See §07 Trial & refund for the ₹100 refund conditions.
- 4
Whitelist the IPv6 with your broker
Copy the address from the portal and add it to your broker's API IP whitelist. Instructions per broker in §04 Broker whitelisting.
- 5
Patch your client
Three lines of Python (or the
/api/v1/proxyHTTP forwarder). Full snippets in §03 SOCKS5 setup, §04 Programmatic API and §05 Algo-trading mini-course.
Run it lean
Six habits that keep spend flat while your strategy scales. Pick the ones that fit your setup — no order, no dependencies.
One IPv6, every broker.
The same IPv6 whitelists on Dhan, Kite, Groww, Fyers. Verifying a second broker under the same email reuses your existing IP — don't provision another one.
Overage beats over-provisioning.
10 GB / month included. Busy month? ₹5 per extra GB. Most order-only workloads sit under 2 GB — no reason to reach for a bigger plan speculatively.
Route the write side. Skip the reads.
Only create, modify, cancel need to leave from your whitelisted IP. Ticks, LTP, holdings, positions, historical bars — go direct. Your bill drops by an order of magnitude.
Skip the VPS.
Your desk already runs faster than a ₹800/mo VPS. The proxy is what makes the exit IP stable — not the machine. Run the strategy locally; you gain compute, lose ops.
Only dispatch touches the network.
Backtests, models, indicators, feature engineering — all local. Only the final order call hits the proxy. Data, strategy and edge stay yours.
Point the agent at the proxy.
Agent watches signals and punches orders from your machine. Same three-line patch — the agent doesn't care where it runs, and the broker sees the same IP either way.
One address per trading identity, not per broker. A family account, a partner book, a bot that needs its own whitelist — that's when you provision a second IPv6. Everything else stays on the one you already pay for.
SOCKS5 setup
Your proxy credentials live in the user portal — SOCKS5 host, port, username and password. Copy from there. Replace USER / PASS in the snippets below.
# pip install PySocks
import socks, socket
socks.set_default_proxy(
socks.SOCKS5,
"comm.servloci.in", 1080,
username="USER",
password="PASS",
)
socket.socket = socks.socksocket # global patch — before any SDK import
# Now every socket in this process egresses via your ServLoci IPv6.
from dhanhq import dhanhq
dhan = dhanhq(client_id="CLIENT_ID", access_token="ACCESS_TOKEN")
Global monkey-patch: applies to any HTTP library that uses socket under the hood — requests, urllib, aiohttp, broker SDKs. Import the SDK after the patch.
Once patched, ping any address-echo endpoint. It should print your dedicated IPv6, not your ISP address.
curl -s --socks5-hostname USER:PASS@comm.servloci.in:1080 https://api6.ipify.orgProgrammatic API · /api/v1
Prefer HTTP over SOCKS5? The /api/v1 endpoints let a script sign in with an api_key + api_secret (generate them in the portal), receive a bearer token, and forward requests to the broker through us — egress happens on your dedicated IPv6.
Exchange {api_key, api_secret, name?} for a 24h bearer token. name is a human-readable label ("trading-bot-1") that shows up in the portal's token list.
curl -s -X POST https://comm.servloci.in/api/v1/login \
-H 'Content-Type: application/json' \
-d '{
"api_key": "YOUR_API_KEY",
"api_secret": "YOUR_API_SECRET",
"name": "trading-bot-1"
}'Returns identifier, email, broker, client_id, assigned IPv6 and current data-usage counters.
curl -H 'Authorization: Bearer TOKEN' https://comm.servloci.in/api/v1/meAny HTTP method after /proxy/ is forwarded to your broker's origin, egressing from your dedicated IPv6. Path is scoped to /orders* and /trades* only (with an optional /vN/ prefix) so a leaked token can't reach funds or profile endpoints.
Auth trick: if your broker also uses an Authorization header (Kite does), send our token as X-Proxy-Token instead and we'll pass their Authorization through untouched.
curl -s -X POST https://comm.servloci.in/api/v1/proxy/orders/regular \
-H 'X-Proxy-Token: SERVLOCI_BEARER' \
-H 'Authorization: token KITE_API_KEY:KITE_ACCESS_TOKEN' \
-H 'Content-Type: application/x-www-form-urlencoded' \
--data 'exchange=NSE&tradingsymbol=INFY&transaction_type=BUY&quantity=1&order_type=MARKET&product=CNC'curl -s https://comm.servloci.in/api/v1/proxy/v2/orders \
-H 'Authorization: Bearer SERVLOCI_BEARER' \
-H 'access-token: DHAN_JWT'List all bearer tokens issued for your account with name + last-used time. Delete with DELETE /api/v1/tokens/<id>.
Algo-trading mini-course
Use ServLoci for the broker-facing dispatch layer: signal generation can stay local, while order placement exits from the static IPv6 your broker has approved. This course shows the production shape without prescribing a trading strategy.
Want to design the strategy itself first? Try the free options strategy builder — pick a template, see the payoff chart, get an AI explanation, and copy ready-to-run order code for your broker.
Prefer runnable code? The ServLoci Colab notebook series covers this course end to end in 20 free notebooks — SDK quickstart, broker auth, Black-Scholes pricing, strategy templates, backtesting, risk sizing, and a capstone algo bot. Each one fetches your static IP and credentials the same way, right in the setup cell — read them here or open any of them straight in Colab.
Obtain your IPv6 in 1 click
Sign in, claim an allocation, then whitelist the address with your broker before any live order call.
Split reads from writes
Market data, historical candles, indicators and portfolio reads can go direct. Route only order create, modify, cancel and trade confirmation calls through ServLoci.
Whitelist before trading
Verify the proxy egress IP, paste that IPv6 into the broker console, then confirm with a non-order authenticated call before enabling live dispatch.
Put risk gates before the proxy
Block oversized orders, repeated symbols, duplicate client order IDs and unknown sessions locally. The proxy should receive only orders that already passed your own checks.
Record every decision
Log signal, risk decision, idempotency key, broker response and ServLoci token name. That audit trail is what lets you debug fills without guessing.
# pip install servloci requests[socks]
import os
import time
import uuid
from decimal import Decimal
import requests
from servloci import ServLoci
BROKER_ORDER_URL = "https://api.example-broker.com/v1/orders"
MAX_QTY = 10
ALLOWED_SYMBOLS = {"INFY", "TCS", "RELIANCE"}
sl = ServLoci(
api_key=os.environ["SERVLOCI_API_KEY"],
api_secret=os.environ["SERVLOCI_API_SECRET"],
)
session = sl.session()
session.headers.update({
"Authorization": f"Bearer {os.environ['BROKER_ACCESS_TOKEN']}",
"X-Client-Order-Source": "servloci-course",
})
def decide_signal(snapshot):
"""Replace this with your strategy. Return None to skip trading."""
if Decimal(snapshot["last_price"]) > Decimal(snapshot["moving_average"]):
return {"symbol": snapshot["symbol"], "side": "BUY", "qty": 1}
return None
def risk_check(order):
if order["symbol"] not in ALLOWED_SYMBOLS:
raise ValueError("symbol_not_allowed")
if not 1 <= int(order["qty"]) <= MAX_QTY:
raise ValueError("qty_outside_limit")
if order["side"] not in {"BUY", "SELL"}:
raise ValueError("bad_side")
def place_order(order):
risk_check(order)
payload = {
"symbol": order["symbol"],
"transaction_type": order["side"],
"quantity": order["qty"],
"order_type": "MARKET",
"product": "INTRADAY",
"client_order_id": str(uuid.uuid4()),
}
response = session.post(BROKER_ORDER_URL, json=payload, timeout=8)
response.raise_for_status()
return response.json()
while True:
snapshot = {"symbol": "INFY", "last_price": "1510.50", "moving_average": "1509.00"}
signal = decide_signal(snapshot)
if signal:
result = place_order(signal)
print({"signal": signal, "broker_response": result})
time.sleep(30)
Install with pip install servloci requests[socks]. Replace the placeholder broker URL and payload with your broker's current order API fields. Test with a non-order endpoint first, then a paper or minimum-size order where your broker supports it.
ServLoci fixes network identity. It does not validate strategy quality, suitability, margin, tax impact or regulatory obligations. Keep approvals and risk controls in your own system before the order reaches the proxy.
Broker whitelisting
Every broker wants to know which IPs will hit their API. Since your assigned address is IPv6, some UIs need a small nudge — the address goes in the same field their examples show as IPv4, or you email support with it. For the current broker-by-broker route, open the dedicated docs pages under Enable static IP.
Kite (Zerodha)
Developers Console → your app → Redirect & URLs.
- Log in at developers.kite.trade.
- Open your app → Edit.
- Paste your ServLoci IPv6 into the IP addresses field (comma-separated if you already have others).
- Save. The whitelist propagates in under a minute — test with
/api/v1/me.
Dhan
Dhan does not enforce IP-whitelisting on order endpoints today. As long as your JWT authenticates, orders route regardless of source IP — the dedicated IPv6 still matters if you also connect a broker webhook that hits you.
Confirm the current policy with Dhan support if you're building something safety-critical.
Groww
Groww Trading API keys are minted from groww.in → Trade API in the account settings. The whitelist field takes IPv6 as-is.
- Open groww.in → Trading APIs.
- Create or edit your API key. Paste your ServLoci IPv6 into the Allowed IPs field (comma-separated with any others).
- Save and copy the access token from the same page — you'll paste it into the ServLoci verify form as access_token.
- Whitelist propagates immediately. Test with
/api/v1/me.
Fyers
Fyers uses an App ID + access token pair (kite-shape). The App ID looks like XY12ABC-100 and lives in the Fyers app config; you paste it in as our API key field.
- Open myapi.fyers.in → your app.
- Under App details, paste the ServLoci IPv6 into Allowed origins / IPs.
- Generate a fresh access token from the app page.
- In the ServLoci verify form: App ID → API key field · access token → access_token field. Client ID is your Fyers
fy_id(e.g.XY12345).
Verifying a second broker under the same email reuses the same IPv6 — you don't get a new address per broker. Whitelist the same one in each dashboard.
Trial & refund policy
/api/v1/login OR any proxied request. Either counts as "used".Requesting the refund is one click in the portal — no ticket, no chat. Razorpay returns the ₹100 to the original payment method; we release the IPv6 back into the pool immediately.
Billing & plans
- 1 dedicated IPv6 + hosted SOCKS5 /api/v1 on our infra
- 10 GB traffic included · ₹5 / extra GB
- Cancel any time — access runs to paid-through date
- ≈ ₹250 / month effective · save ₹601
- Everything in cloud monthly
- Locked-in rate for 12 months
- Up to 10 active IPv6 on a host you provide
- Opaque install — fully managed and controlled by ServLoci
- You supply the machine · we operate the stack
Cloud plans subscribe from the portal — Razorpay handles the auto-charge on renewal. Cancelling stops future charges only; you keep the IP until the period you paid for expires. A trial that hasn't expired is upgraded in place when you subscribe — same address, no re-whitelisting.
Self-hosted places a fully managed opaque install on hardware you provide (VPS, colo, or on-prem). ServLoci controls install, updates, routing, and the IPv6 lifecycle (up to 10 active addresses). You do not operate or reconfigure the internals — it is appliance-style, not a kit you maintain. Approximate list price ≈ ₹1,500/mo — write to support@servloci.in to size the host and request an install. If you need fully own control of source and routing, you are free to develop one yourself — that is not the ServLoci self-hosted product.
Troubleshooting
My machine can't route IPv6 at all
Some ISPs still don't route native IPv6. Two workarounds:
- Use the SOCKS5 proxy — SOCKS5 tunnels TCP over IPv4 from your side; only the last hop from us to the broker is IPv6.
- Or use /api/v1/proxy — same shape. You POST to us over IPv4, we egress on your IPv6.
You never need working end-to-end IPv6 on your side. That's the whole point of the service.
"invalid credentials" from /api/v1/login
Both api_key and api_secret are shown once at generation time. If you didn't save the secret, rotate from the portal — this mints a fresh pair and drops every existing bearer token.
"path not allowed" from /api/v1/proxy
Proxy is scoped to /orders* and /trades* (with an optional /vN/ prefix). Funds, holdings, positions and profile endpoints are deliberately blocked so a bearer leak has a small blast radius.
For those calls, use the SOCKS5 proxy directly instead — no path allow-list there.
Broker returns 401 through the proxy
Most likely your access token expired. Broker tokens usually live 6–24 hours. Regenerate at the broker end and retry — nothing on our side needs to change.
If the token is fresh and it still fails, check that your ServLoci IPv6 is actually whitelisted on the broker (Kite especially). Test with curl -H 'Authorization: token …' https://api.kite.trade/user/profile through SOCKS5 — a 200 there but 401 on orders points to a missing whitelist.
My refund button isn't showing
Three things must all be true: (a) payment status is "paid", (b) you haven't logged in or proxied a single call yet, (c) it's been less than 24h since the IPv6 was locked. Portal shows the reason inline once the window closes.
I hit 10 GB. What now?
Overage bills at ₹5 / GB on the next monthly cycle. No hard cap — orders keep flowing. Monitor from the usage card in the portal.