API reference · v1 · KYC gated
Bind a broker pair.
Read its static IP from code.
Use a ServLoci bearer token to associate each broker client ID with your current IPv6. No broker password, API secret, access token, PIN, or TOTP belongs in these requests.
https://comm.servloci.inAuthX-ServLoci-TokenGateKYC approvedCreate bearer token
Authenticate machine-to-machine.
Exchange API credentials shown in your portal for a short-lived bearer token. Keep API secret server-side.
curl -sS -X POST https://comm.servloci.in/api/v1/login \
-H 'Content-Type: application/json' \
-d '{
"api_key": "YOUR_SERVLOCI_API_KEY",
"api_secret": "YOUR_SERVLOCI_API_SECRET",
"name": "broker-ip-sync"
}'{
"token": "sl_live_...",
"token_type": "Bearer",
"expires_at": "2026-08-24T06:00:00Z"
}Idempotent pair binding
/api/v1/broker-ip
Bind one supported broker and client ID to your account’s active IPv6. Repeat request safely. Broker aliases normalize—for example, zerodha becomes kite.
curl -sS -X PUT https://comm.servloci.in/api/v1/broker-ip \
-H 'X-ServLoci-Token: sl_live_YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"broker": "dhan",
"client_id": "1000000001"
}'{
"broker": "dhan",
"client_id": "1000000001",
"ipv6_address": "2401:c080:2400:2fed::42",
"subscription_status": "active",
"kyc_status": "approved",
"http_proxy_path": "/api/v1/proxy",
"broker_api_origin": "https://api.dhan.co"
}Read current address
/api/v1/broker-ip
Resolve a previously bound pair. Address comes from current live subscription, so approved address replacement does not leave stale pair records.
curl -sS -G https://comm.servloci.in/api/v1/broker-ip \
-H 'X-ServLoci-Token: sl_live_YOUR_TOKEN' \
--data-urlencode 'broker=dhan' \
--data-urlencode 'client_id=1000000001'Use returned ipv6_address in broker allowlist. Call again after any ServLoci address replacement.
Direct HTTP connection
Send approved broker calls.
After broker allowlist accepts returned IPv6, call ServLoci forwarder with same bearer token and broker selector. Your broker’s normal authentication header stays unchanged and passes through.
curl -sS https://comm.servloci.in/api/v1/proxy/v2/orders \
-H 'X-ServLoci-Token: sl_live_YOUR_TOKEN' \
-H 'X-ServLoci-Broker: dhan' \
-H 'access-token: YOUR_DHAN_ACCESS_TOKEN'Forwarder accepts order and trade paths only. Market data, holdings, positions, profile, and unrelated destinations stay direct.
Response contract
Failures tell caller what to fix.
400Missing client ID or unsupported broker.401Missing, invalid, or expired ServLoci token.403KYC not approved. Follow returned KYC URL.404Requested pair has not been bound by this account.409Broker pair already belongs to another account.412No active IPv6 subscription exists for account.