360 Secure SkillHub
360 安全技能中心

Kraken Agent

这是Kraken官方AI原生交易CLI,支持加密货币、股票、外汇等多品类交易。核心功能含无需API密钥的纸盘模拟、实时行情查询、内置MCP服务器适配自动化代理,输出结构化JSON。典型场景:搭建交易代理、纸盘测试、获取Kraken实时行情、MCP连接API,单二进制安装无依赖,实盘需配置API密钥。

djc00p
djc00p
热度 49.91
最近更新 2026-05-11 17:42:48
分类:开发依赖:MCP 服务 / 第三方 API / 代码执行应用场景:财务 / API 集成 / 数据处理 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add kraken-agent
Metadata
name
kraken-agent
description
Discover and use the official Kraken CLI — an AI-native trading tool for crypto, stocks, forex, and derivatives. Use when: setting up a trading agent, paper trading crypto or futures, accessing live Kraken market data, or connecting to the Kraken API via MCP. Trigger phrases: kraken trading, paper trading, crypto agent, kraken cli, trade bitcoin, market data, kraken mcp.
metadata
{"clawdbot":{"emoji":"📈","requires":{"bins":[]},"os":["darwin","linux"]},"homepage":"https://github.com/krakenfx/kraken-cli"}

Kraken CLI

The official AI-native CLI for trading crypto, stocks, forex, and derivatives on Kraken. Built for agents — structured JSON output, consistent error envelopes, built-in MCP server, and paper trading with no API key required.

Repo: https://github.com/krakenfx/kraken-cli Docs: See AGENTS.md, CONTEXT.md, and skills/ in the repo for agent integration guides.

Install

See the official install instructions in the repo. Single binary, no runtime dependencies.

Verify install:

kraken --version

What It Covers

Asset class Examples
Crypto spot BTC, ETH, SOL — 1,400+ pairs
xStocks (tokenized) AAPL, NVDA, TSLA, SPY, QQQ
Forex EUR/USD, GBP/USD, USD/JPY
Perpetual futures 317 contracts, up to 50x margin
Earn / staking Flexible and bonded strategies

Paper Trading (No API Key Needed)

Safe sandbox against live prices — no account, no real money:

kraken paper init --balance 10000 -o json
kraken paper buy BTCUSD 0.01 -o json
kraken paper status -o json
kraken paper history -o json
kraken paper reset -o json

Futures paper trading also available: kraken futures paper

Live Market Data (No API Key Needed)

kraken ticker BTCUSD -o json
kraken orderbook BTCUSD --count 10 -o json
kraken ohlc BTCUSD --interval 60 -o json

MCP Server

Built-in Model Context Protocol server over stdio — works with Claude, Codex, Gemini CLI, Cursor, and OpenClaw:

kraken mcp                    # market + account + paper (default)
kraken mcp -s market,paper    # read-only, no auth needed
kraken mcp -s all             # all services (dangerous calls require acknowledged=true)

Add to your MCP client config:

{
  "mcpServers": {
    "kraken": {
      "command": "kraken",
      "args": ["mcp", "-s", "market,paper"]
    }
  }
}

Authentication (Live Trading)

# Interactive setup
kraken setup

# Or via environment variables
export KRAKEN_API_KEY="your-key"
export KRAKEN_API_SECRET="your-secret"

Get API keys at: https://www.kraken.com (Settings > API)

⚠️ Never pass keys directly on the CLI — use kraken setup or environment variables to avoid shell history exposure.

Agent Integration Tips

  • Always use -o json — stdout is always valid JSON on success
  • Route on the error field in error envelopes, not message
  • Paper trading is the right starting point for any new agent setup
  • The repo's skills/ folder contains 50 goal-oriented workflow packages
  • AGENTS.md and CONTEXT.md in the repo cover rate limits, error handling, and invocation patterns