Command-line interface for Cryptohopper.
Status: 0.6.0-alpha.1 — alpha. Published to npm as
@cryptohopper/cli; standalone binaries for macOS (arm64 + x64), Linux x64, and Windows x64 attached to every GitHub release.
Deeper docs: Scripting & CI · Troubleshooting · Public CLI reference
npm install -g @cryptohopper/clicurl -L https://github.com/cryptohopper/cryptohopper-cli/releases/latest/download/cryptohopper-darwin-arm64 -o /usr/local/bin/cryptohopper
chmod +x /usr/local/bin/cryptohoppercurl -L https://github.com/cryptohopper/cryptohopper-cli/releases/latest/download/cryptohopper-darwin-x64 -o /usr/local/bin/cryptohopper
chmod +x /usr/local/bin/cryptohoppercurl -L https://github.com/cryptohopper/cryptohopper-cli/releases/latest/download/cryptohopper-linux-x64 -o /usr/local/bin/cryptohopper
chmod +x /usr/local/bin/cryptohopperDownload cryptohopper-windows-x64.exe from the latest release, rename to cryptohopper.exe, place on %PATH%.
Verify with sha256sum -c SHA256SUMS (macOS/Linux) / certutil -hashfile cryptohopper.exe SHA256 (Windows).
cryptohopper login # opens your browser to authorize via OAuth2
cryptohopper whoami # confirm identity
cryptohopper hoppers list # list your bots
cryptohopper positions <hopper-id> # open positions
cryptohopper ticker binance BTC/USDT # spot price (still requires `cryptohopper login`)
cryptohopper backtest new <hopper-id> --from 2026-01-01 --to 2026-03-01
cryptohopper backtest status <backtest-id>
cryptohopper upgrade # self-update to latest releaseAll commands accept --json for scripting.
cryptohopper login drives a browser-based OAuth2 authorization-code flow:
- The CLI starts a one-shot listener on
http://127.0.0.1:18765/callback. - Your default browser opens Cryptohopper's consent page.
- You click "Allow" for the scopes the CLI requests (
read manage trade user). - Cryptohopper redirects to
127.0.0.1:18765/callback?code=...&state=.... - The CLI exchanges the code for a bearer token and saves it to
~/.cryptohopper/config.json(mode 0600).
The CLI is a public OAuth client — no client_secret is sent. Security relies on strict server-side redirect-URI matching, a random state nonce per login, and the loopback-only listener.
If you already have a bearer token, skip the browser flow:
cryptohopper login --token <your-40-char-token>CRYPTOHOPPER_TOKEN— bearer token; skips login entirelyCRYPTOHOPPER_APP_KEY— OAuthclient_id, sent asx-api-app-keyCRYPTOHOPPER_API_URL— staging override (defaults tohttps://api.cryptohopper.com/v1)CRYPTOHOPPER_WEB_URL— OAuth consent origin override (defaults tohttps://www.cryptohopper.com)
Config is stored at ~/.cryptohopper/config.json with 0600 perms.
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Generic / user error |
| 2 | Auth (UNAUTHORIZED, FORBIDDEN, DEVICE_UNAUTHORIZED) |
| 3 | Rate-limited |
| 4 | Server / service unavailable |
| 5 | Network / timeout |
cryptohopper completion bash >> ~/.bashrc
cryptohopper completion zsh >> ~/.zshrc
cryptohopper completion fish > ~/.config/fish/completions/cryptohopper.fish
cryptohopper completion powershell | Out-File -Append $PROFILE| Language | Package | Install |
|---|---|---|
| Node.js | @cryptohopper/sdk |
npm i @cryptohopper/sdk |
| Python | cryptohopper |
pip install cryptohopper |
| Go | github.com/cryptohopper/cryptohopper-go-sdk |
go get github.com/cryptohopper/cryptohopper-go-sdk |
npm install
npm run typecheck
npm run build # dist/index.js for Node
npm run compile:all # cross-platform binaries via BunPush a cli-v<version> git tag. The workflow typechecks, verifies version parity, cross-compiles via Bun, generates SHA256SUMS, and attaches everything to a prerelease.
MIT — see LICENSE.