Brokers and daily sessions
Geometer Markets connects directly from your machine or cloud VM to your own broker API app. Your broker API secret and daily access token never leave your host.
Supported brokers and IPv6 status
Section titled “Supported brokers and IPv6 status”| Broker | Execution & account adapter | Drop-in route | IPv6 status | Notes |
|---|---|---|---|---|
| Zerodha (Kite Connect) | Yes (plus Kite Ticker stream & history) | /kite/... |
IPv6 endpoint (confirm with address check) |
Register your static IP in the Kite developer console; read-only market data works from any IP. |
| Upstox | Yes | Planned | IPv6 endpoint (confirm with address check) |
Uses standard /v1/... Geometer Order API today. |
| Composite Edge | Yes | /v1/... |
IPv6 per Symphony XTS gateway (confirm with address check) |
Runs on Symphony XTS endpoints. |
| Symphony XTS | Yes | /v1/... |
Depends on member broker gateway (confirm with address check) |
Configure your member broker’s XTS base URL. |
| Noren | Yes | /v1/... |
Depends on member broker gateway (confirm with address check) |
Multi-broker OMS (such as Shoonya and Flattrade), configured via NOREN_BASE_URL. |
| Fyers | Yes | /v1/... |
IPv4 only | api.fyers.in and api-t1.fyers.in publish no AAAA record; address create automatically provisions a static IPv4 path. |
| Groww | Yes | /v1/... |
IPv6 endpoint (confirm with address check) |
Uses standard /v1/... Geometer Order API. |
Always run geometer-markets address check --broker <name> after pasting your static address into the broker’s developer console to verify empirically that the broker’s order gateway accepts your IP before trading live. See Static IPv6 address.
Daily login (geometer-markets login)
Section titled “Daily login (geometer-markets login)”Indian exchange rules require API trading sessions to expire daily so the account holder authenticates each trading morning.
Standard localhost callback
Section titled “Standard localhost callback”Run login on your desktop or via your tunneled workstation:
geometer-markets login zerodhaThe CLI:
- Starts a temporary single-request listener bound strictly to
127.0.0.1:<port>/callbackwith a 128-bit random OAuthstatenonce. - Prints and opens your broker’s official login URL in your browser.
- Exchanges the one-time authorization token locally using your stored
api_secret, closes the temporary listener immediately, and appends asession_event(login)entry to your signed record.
Manual paste-back (headless servers or strict redirect URLs)
Section titled “Manual paste-back (headless servers or strict redirect URLs)”If you run the Order Guard on a headless Mumbai VM or your broker’s developer portal does not accept a 127.0.0.1 redirect URL, pass --manual:
geometer-markets login zerodha --manualThe CLI prints the broker login URL, prompts you to paste the redirected URL (or token) from your browser, exchanges it for the day’s access token locally, and never writes the pasted token to shell logs or record files. Where a broker supports interactive credential entry (such as XTS or Noren setups), credentials are entered via terminal prompt and never passed as command-line arguments.
Encrypted secret storage
Section titled “Encrypted secret storage”Local secrets — broker api_key, api_secret, daily access_token, Ed25519 signing private key, and optional SMTP password — are never stored in plaintext config files, SQLite tables, logs, reports, or signed record entries.
- Desktop (macOS, Linux desktop, Windows): stored in your operating system’s native keychain (macOS Keychain, Linux Secret Service, Windows Credential Manager) under service
geometer-markets. - Headless Linux server: stored in
<data_dir>/secrets.enc(0600file permissions inside a0700directory, owned by thegeometer-marketsservice user), encrypted with AES-256-GCM using a fresh 96-bit nonce per write. The master key is derived from your passphrase with Argon2id (or supplied via a0400service keyfile /systemdencrypted credential for unattended reboots). The guard refuses to start ifsecrets.encis group- or world-readable.
Mandatory daily logout (16:00 IST)
Section titled “Mandatory daily logout (16:00 IST)”After NSE and BSE regular market close (15:30 IST), the Order Guard automatically ends every live broker session at 16:00 IST (configurable between 15:35 IST and 23:59 IST; cannot be disabled in live mode):
- Invokes the broker’s session invalidation endpoint where supported (such as
DELETE /session/tokenon Kite). - Wipes the daily
access_tokenfrom memory and encrypted storage. - Appends
session_event(logout_daily)to your signed record. - Marks the account
logged_outso any further order request fails closed with HTTP503(code: "session_expired").
You can also log out immediately at any time with geometer-markets login <broker> --logout.
Pre-market morning reminders
Section titled “Pre-market morning reminders”The session scheduler reads the dated NSE and BSE trading calendar:
- On every trading day, if an account does not yet have a valid session minted for today’s IST date, the guard sends a reminder at
08:30 IST(before the09:00 ISTpre-open and09:15 ISTopen) with the exactgeometer-markets login <broker>command. - If the session is still unauthenticated at
09:00 IST, a second reminder fires. - On weekends and exchange holidays, no reminders are sent.
If a broker invalidates a token unexpectedly mid-day (401 or token error from the broker), the guard clears the cached session at once, records session_event(expired), refuses new orders (session_expired), and emits an immediate alert.
Order tags and outside-order tracking
Section titled “Order tags and outside-order tracking”Every order submitted by the Order Guard carries a compact guard tag prefixed with G (within the 20-character broker tag cap) so your signed record and the broker’s order book match unambiguously. Strategy names stay in your local signed record rather than leaking into broker tags.
Any order discovered on the broker’s order book without a matching guard placement record is flagged as an outside order, counted against your active limits.json thresholds, and listed in your evening report.
Account limits by plan
Section titled “Account limits by plan”- Free: paper trading and backtesting (
0live broker accounts). - Personal:
1live broker account. - Pro: up to
5live broker accounts (for family accounts or multiple brokers), with per-accountlimits.jsonand year-end exports.