Model or dataset
krakenfx/kraken-cli avatar
krakenfx/kraken-cli

Kraken CLI: a trading command line built for agents, not for terminals

The first AI-native CLI for trading crypto, stocks, forex, and derivatives.

772 stars109 forksRustMIT

At a glance

What is it?
Kraken CLI is a Rust binary that exposes the Kraken exchange API to humans and to LLM agents through JSON output, exit codes and a built-in MCP server, with paper trading for safe iteration. It is flagged as experimental software that can move real money, and it is pre-1.0.
Who is it for?
Kraken CLI fits a developer who wants to script against the Kraken API from a shell or wire it into an agent, and it does not fit a trading desk that needs audited, versioned execution guarantees, since the project labels itself experimental and sits at version 0.4.1.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 10 days ago.
What is it written in?
Mainly Rust, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.

Editorial analysis

A CLI whose primary consumer is an agent

Kraken CLI is a Rust command line tool that gives full access to the Kraken API and covers crypto, tokenized stocks, forex, perpetuals, inverse and fixed-date futures, and earn strategies from a single binary. What distinguishes it from a typical API wrapper is stated in the README directly: most CLIs are built for humans at a terminal, and this one is built for LLM-based agents, MCP tool servers and automated pipelines that need to call Kraken reliably without writing custom API clients.

That goal shows up in the interface. Every command supports a JSON output mode, so there is no screen scraping and no parsing of table borders. Errors are JSON objects with a stable error field whose values are auth, rate_limit, validation, api or network, which means an agent can branch on a category instead of on a human sentence. Exit codes are predictable: zero for success, non-zero for failure.

The core invocation pattern is short:

bash
kraken <command> [args...] -o json 2>/dev/null

The rules that go with it are explicit. Stdout is always valid JSON on success, or a JSON error envelope on failure. Stderr carries diagnostics only, structured JSON logs with warnings and errors by default and more with -v or RUST_LOG, and the documentation says explicitly never to parse stderr for data.

The project is MIT licensed and published under the krakenfx organisation, with a repository that also contains AGENTS.md, CLAUDE.md, CONTEXT.md, an llms.txt and plugin manifests for several agent tools.

One interface across six asset classes

All trading commands work across asset classes with the same interface, and an asset class flag selects the market where it is needed.

| Asset class | Instruments | Margin | Flag | Example | |---|---|---|---|---| | Crypto spot | 1,400+ pairs (BTC, ETH, SOL, and hundreds more) | Up to 10x on major pairs | default | `kraken order buy BTCUSD 0.001 --type limit --price 50000` | | Tokenized U.S. stocks and ETFs (xStocks) | 79 assets: AAPL, NVDA, TSLA, GOOGL, AMZN, MSFT, SPY, QQQ, and more | Up to 3x on top 10 | `--asset-class tokenized_asset` | `kraken order buy AAPLx/USD 0.1 --type limit --price 200 --asset-class tokenized_asset` | | Forex | 11 fiat pairs: EUR/USD, GBP/USD, USD/JPY, AUD/USD, and more | none | `--asset-class forex` | `kraken ticker EURUSD --asset-class forex` | | Perpetual futures | 317 contracts: crypto, 5 forex perps, 11 equity/index perps | Up to 50x | futures engine | `kraken futures order buy PF_XBTUSD 1 --type limit --price 50000` | | Inverse and fixed-date futures | 20 contracts: BTC, ETH, SOL, LTC, XRP, ADA, DOGE, LINK | Varies | futures engine | `kraken futures order buy FI_XBTUSD_260327 1 --type limit --price 50000` | | Earn / staking | Flexible and bonded strategies across multiple assets | none | none | `kraken earn strategies --asset ETH` |

Two details in that table matter for anyone automating it. Spot is the default, so an agent that forgets the asset class flag will place a crypto order rather than a forex or tokenized asset order, which is a safe default for the wrong reason. And perps run through a separate futures engine, with their own command prefix, so a script written against spot order syntax does not carry over.

The README also notes that xStocks are not available in the USA and that availability for all products varies by jurisdiction.

Paper trading that shares the interface with live orders

The tool provides paper trading for both spot and perpetual futures, and the description is specific about what it buys you: test strategies against live prices with the kraken paper and kraken futures paper commands, with no API keys, no real money and the same interface as live trading.

Same interface is the important part. A strategy that works in a paper session exercises the same command syntax, the same JSON shapes and the same error envelopes as the live path, so the parts of an agent that are hardest to test, the argument construction and the response parsing, can be validated before any funds are at risk. What paper mode does not validate is the exchange's own behaviour under load, and it does not tell you whether your position sizing survives real execution.

On top of that sits the recording layer. The kraken record command captures live streams into a local DuckDB or JSONL tape library with integrity counters, finalized tapes replay into paper sessions, and those tapes feed the autoresearch lab. The repository examples are named for the workflow they document, including examples/03-market-memory.md and examples/04-sessions-replay-explain.md, and there is a separate crates/kraken-recording and crates/kraken-replay in the Cargo workspace.

This is the part of the project that goes beyond a trading wrapper. It treats a market session as a recordable object, which is what makes a strategy testable against a specific past tape rather than against whatever the market does next.

The agent resource files are the actual API contract

For a tool that targets agents, the documentation is delivered as files an agent can read, and the README lists them as a table.

| Resource | Description | |----------|-------------| | [CONTEXT.md](CONTEXT.md) | Runtime context for tool-using agents | | [AGENTS.md](AGENTS.md) | Full integration guide: auth, invocation, errors, rate limits | | [docs/feedback-ingest.md](docs/feedback-ingest.md) | How `kraken feedback` uploads to Kraken (limits, retention) | | [agents/tool-catalog.json](agents/tool-catalog.json) | 174 commands with parameter schemas, types, and safety flags | | [agents/error-catalog.json](agents/error-catalog.json) | 10 error categories with retry guidance | | [skills/](skills/) | Goal-oriented SKILL.md workflow packages | | [CLAUDE.md](CLAUDE.md) | Claude-specific integration guidance |

The tool catalog is the centrepiece: 174 request and response commands with parameter schemas, types and safety flags. The error catalog gives 10 categories with retry guidance, which pairs with the rate-limit behaviour, where the CLI does no client-side throttling but returns an enriched error with suggestion, retryable and docs_url fields so an agent can read the documentation and adapt.

The catalog describes Spot, Futures, xStocks, Forex, Funding, Earn, Subaccounts and paper trading. Long-running WebSocket, recording, replay, session-start and stream-daemon surfaces remain CLI-only, which is an important boundary: the agent-facing catalog does not cover everything the binary can do.

Installation, platform coverage and the built-in MCP server

The distribution is a single binary with no runtime dependencies, and the one-liner installer detects the OS and architecture:

bash
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/krakenfx/kraken-cli/releases/latest/download/kraken-cli-installer.sh | sh

macOS on Apple Silicon and Intel is supported, as is Linux on x86_64 and ARM64. Windows is not native, and the documented answer is to use WSL. Pre-built binaries are also on the GitHub Releases page, and building from source needs Rust:

bash
cargo install --git https://github.com/krakenfx/kraken-cli

or a clone followed by a local install:

bash
git clone https://github.com/krakenfx/kraken-cli.git
cd kraken-cli
cargo install --path .

A quick check after installing is a status call and a ticker query:

bash
kraken status && kraken ticker BTCUSD

The MCP server is built in, with native Model Context Protocol support over stdio, and the documentation says no subprocess wrappers are needed. The repository carries plugin manifests for several agent tools, including .claude-plugin/, .codex-plugin/, .cursor-plugin/ and a gemini-extension.json, plus an .mcp.json at the root.

There is also a section on verifying binaries in the table of contents, which is a sensible thing for a tool that can place real orders, though the verification instructions themselves are not part of the visible text here.

Experimental software that can execute real transactions

The README carries a caution box that any honest review has to lead with: this is experimental software, it interacts with the live Kraken exchange, and it can execute real financial transactions. The instruction is to read DISCLAIMER.md before using it with real funds or with AI agents. That file is a top-level entry in the repository.

The risk profile is unusual for a developer tool. Most CLIs fail in a way that costs time; this one can fail in a way that costs money, and the intended consumer is an autonomous process that reads JSON and decides. The mitigation is in the design rather than in a promise, with paper trading available, a safety flag on every catalogued command, and errors that tell an agent whether a failure is retryable. The README also points out the subaccount surface among the command groups, so scoping a strategy to a subaccount is possible in the API surface.

Two other limits are worth stating plainly. The versioning is pre-1.0, at 0.4.1, and the release history is recent rather than established: v0.4.1 on 2026-08-07 and v0.4.0 on 2026-07-27. The repository is not archived and the last push was on 2026-10-13.

The engineering around it is serious for a young project. The justfile is described as the single source of truth for every quality gate, and CI runs the same recipes, so a green local ready matches a green pipeline. The ready recipe is:

bash
ready: fmt-check sort-check lint test docs deny msrv

The MSRV is derived from Cargo.toml rather than duplicated, and the workspace pins rust-version 1.97 with edition 2024. The lint gate runs clippy across the workspace with all targets and all features and warnings treated as errors, and there are separate gates for dependency auditing and for the minimum supported Rust version.

Editorial conclusion

Kraken CLI fits a developer who wants to script against the Kraken API from a shell or wire it into an agent, and it does not fit a trading desk that needs audited, versioned execution guarantees, since the project labels itself experimental and sits at version 0.4.1. Before using it with real funds, read DISCLAIMER.md, start with the paper trading commands to confirm the interface matches your strategy, and check the safety flags in agents/tool-catalog.json for the specific command you plan to automate.

Frequently asked questions

How do I install Kraken CLI?

The documented one-liner downloads an installer script that detects the OS and architecture and installs the single binary, with macOS on Apple Silicon and Intel and Linux on x86_64 and ARM64 supported. Windows users are told to use WSL, and you can also build from source with cargo install --git https://github.com/krakenfx/kraken-cli.

Does Kraken CLI support paper trading, and does it use the same commands as live trading?

Yes. Paper trading exists for spot and for perpetual futures through the kraken paper and kraken futures paper commands, with no API keys and no real money, and the interface is the same as live trading, which is what makes it usable for testing a strategy before risking funds.

How does the CLI report errors for automated callers?

Errors are JSON objects with a stable error field taking values such as auth, rate_limit, validation, api or network, stdout carries a JSON error envelope on failure, and the exit code is zero for success and non-zero for failure. agents/error-catalog.json documents 10 error categories with retry guidance.

Which asset classes can I trade with Kraken CLI?

Crypto spot with 1,400+ pairs, tokenized U.S. stocks and ETFs with 79 assets, 11 forex pairs, 317 perpetual futures contracts, 20 inverse and fixed-date futures contracts, and earn and staking strategies. Spot is the default and the other classes are selected with an asset class flag or the futures command prefix.

Is it safe to let an AI agent run Kraken CLI?

The project labels the software experimental and states that it can execute real financial transactions, and it asks you to read DISCLAIMER.md before using it with real funds or with AI agents. The tool catalog records a safety flag per command, and paper trading exists so a strategy can be exercised against live prices without real orders.

Official sources

  1. Issues
  2. krakenfx/kraken-cli on GitHub
  3. License: MIT
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/krakenfx-kraken-cli.svg)](https://hysenlabs.com/projects/krakenfx-kraken-cli)