Skip to content

Brokers and daily sessions

This content is not available in your language yet.

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.

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.

Indian exchange rules require API trading sessions to expire daily so the account holder authenticates each trading morning.

Run login on your desktop or via your tunneled workstation:

Terminal window
geometer-markets login zerodha

The CLI:

  1. Starts a temporary single-request listener bound strictly to 127.0.0.1:<port>/callback with a 128-bit random OAuth state nonce.
  2. Prints and opens your broker’s official login URL in your browser.
  3. Exchanges the one-time authorization token locally using your stored api_secret, closes the temporary listener immediately, and appends a session_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:

Terminal window
geometer-markets login zerodha --manual

The 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.

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 (0600 file permissions inside a 0700 directory, owned by the geometer-markets service 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 a 0400 service keyfile / systemd encrypted credential for unattended reboots). The guard refuses to start if secrets.enc is group- or world-readable.

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):

  1. Invokes the broker’s session invalidation endpoint where supported (such as DELETE /session/token on Kite).
  2. Wipes the daily access_token from memory and encrypted storage.
  3. Appends session_event(logout_daily) to your signed record.
  4. Marks the account logged_out so any further order request fails closed with HTTP 503 (code: "session_expired").

You can also log out immediately at any time with geometer-markets login <broker> --logout.

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 the 09:00 IST pre-open and 09:15 IST open) with the exact geometer-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.

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.

  • Free: paper trading and backtesting (0 live broker accounts).
  • Personal: 1 live broker account.
  • Pro: up to 5 live broker accounts (for family accounts or multiple brokers), with per-account limits.json and year-end exports.