Skip to main content
kraken-cli is a single compiled binary for trading and account management across the Kraken exchange. No runtime dependencies. One install covers Spot, Derivatives, xStocks, Forex, Earn, and Subaccounts.

GitHub

Source, releases, and changelog

MCP server

Expose all 151 commands as tools for AI agents via the built-in MCP server

Install

Supported on macOS (Apple Silicon and Intel), Linux (x86_64 and ARM64), and Windows via WSL. Release binaries are Minisign-verified. Verify the install:

What it covers

151 commands across 13 groups. Six asset classes in one binary:

Command groups

Paper trading

The CLI’s built-in paper trading engine runs against live prices with no authentication required. It is the recommended way to test strategies and integrations.
Paper and live trading share the same command interface — switching to live is a matter of removing the paper subcommand and providing credentials.

Scripting and automation

All 151 commands support -o json output and consistent exit codes (0 = success, non-zero = failure), making them composable in shell scripts and CI pipelines:
Stdout always produces valid JSON on success or an error envelope on failure. Stderr carries diagnostics only. Never parse stderr for data.

Account management

Dead man’s switch

Cancel all open orders if your process stops sending heartbeats:

Authentication

Credentials are resolved in this order:
  1. Command-line flags (--api-key, --api-secret)
  2. Environment variables (KRAKEN_API_KEY, KRAKEN_API_SECRET)
  3. Config file (~/.config/kraken/config.toml)
Run the setup wizard to configure interactively:
Generate API keys at Settings → API for Spot, or in the Futures interface for Derivatives. Grant only the permissions your workflow needs.

Interactive shell

For exploratory sessions:

AI agent integration

The CLI is designed for machine consumption: structured JSON output, stable error categories, and predictable exit codes. See the MCP server page to expose all commands as tools for LLM agents. Agent resources shipped with the CLI: