CLI-based tooling for Zerodha Kite workflows.
Note: This is an unofficial implementation. It uses the official Go SDK gokiteconnect.
- Go
1.26.0(exact version)
Install the latest release without cloning the repo or building from source.
Linux/macOS (curl):
curl -fsSL https://raw.githubusercontent.com/jatinbansal1998/zerodha-kite-cli/main/scripts/install.sh | shLinux/macOS (wget):
wget -qO- https://raw.githubusercontent.com/jatinbansal1998/zerodha-kite-cli/main/scripts/install.sh | shLinux/macOS (pin a specific version):
curl -fsSL https://raw.githubusercontent.com/jatinbansal1998/zerodha-kite-cli/main/scripts/install.sh | sh -s -- --version v1.2.3Windows PowerShell:
irm https://raw.githubusercontent.com/jatinbansal1998/zerodha-kite-cli/main/scripts/install.ps1 | iexWindows CMD:
powershell -NoProfile -ExecutionPolicy Bypass -Command "irm https://raw.githubusercontent.com/jatinbansal1998/zerodha-kite-cli/main/scripts/install.ps1 | iex"Windows PowerShell (pin a specific version):
$env:ZERODHA_VERSION='v1.2.3'
irm https://raw.githubusercontent.com/jatinbansal1998/zerodha-kite-cli/main/scripts/install.ps1 | iexThis repository pins the Go toolchain in go.mod via:
go 1.26toolchain go1.26.0
go build ./cmd/zerodhaRun an on-demand self-update check and apply the latest release:
zerodha update- Config file:
~/.config/zerodha/config.json - Cache directory: OS-native cache root +
/zerodha(viaos.UserCacheDir())
- Add a profile:
zerodha config profile add default --api-key <api_key> --api-secret <api_secret> --set-activeOptional: update credentials individually:
zerodha config profile set-api-key default --api-key <api_key>
zerodha config profile set-api-secret default --api-secret <api_secret>- Login:
zerodha auth login --request-token <request_token_or_redirect_url>Manual mode and callback mode are mutually exclusive.
- Fetch data:
zerodha profile show
zerodha profile full
zerodha quote get NSE:INFY NSE:TCS
zerodha quote ltp NSE:INFY NSE:TCS
zerodha quote ohlc NSE:INFY NSE:TCS
zerodha quote historical --instrument-token 408065 --interval day --from 2026-01-01 --to 2026-02-01
zerodha instruments list
zerodha instruments list --exchange NSE
zerodha instruments mf
zerodha gtt list
zerodha mf orders list
zerodha mf sips list
zerodha mf holdings
zerodha orders list
zerodha orders trades
zerodha orders trades --order-id <order_id>
zerodha positions
zerodha positions convert --exchange NSE --symbol INFY --old-product CNC --new-product MIS --position-type day --txn BUY --qty 1
zerodha holdings
zerodha holdings auctions
zerodha holdings auth-initiate --type equity --transfer-type pre
zerodha margins --segment all
zerodha margins order --exchange NSE --symbol INFY --txn BUY --type MARKET --product CNC --qty 1
zerodha margins basket --exchange NSE --symbol INFY --txn BUY --type MARKET --product CNC --qty 1 --consider-positions
zerodha margins charges --exchange NSE --symbol INFY --txn BUY --type MARKET --product CNC --qty 1 --avg-price 1500- Place order:
zerodha order place --exchange NSE --symbol INFY --txn BUY --type MARKET --product CNC --qty 1
zerodha order exit --order-id <order_id> --variety regularzerodha config profile add <name> --api-key ... --api-secret ...adds a new profile or updates an existing one.zerodha config profile set-api-key <name> --api-key ...updates only the API key.zerodha config profile set-api-secret <name> --api-secret ...updates only the API secret.
Exactly one login mode is required:
- Manual token mode:
zerodha auth login --request-token <request_token_or_redirect_url>- Local callback mode:
zerodha auth login --callback
zerodha auth login --callback --callback-port 8787Invalid combinations:
--request-tokenand--callbacktogether.--callback-portexplicitly set without--callback.
Other session commands:
zerodha auth renewrenews access token using stored refresh token.zerodha auth logoutinvalidates access token (if possible) and clears local tokens.zerodha auth revoke-refresh [--refresh-token <token>]invalidates refresh token (defaults to stored token).
- Coverage and implementation plan are tracked in
SDK_COVERAGE_ROADMAP.md.