Interact with 100+ cryptocurrency exchanges — fetch markets, order books, tickers, place orders, check balances, and more using the CCXT CLI.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install ccxt或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install ccxt⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/ccxt/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: ccxt description: Interact with 100+ cryptocurrency exchanges — fetch markets, order books, tickers, place orders, check balances, and more using the CCXT CLI. homepage: https://docs.ccxt.com user-invocable: true metadata: {"openclaw":{"emoji":"📊","requires":{"bins":["ccxt"]},"install":[{"id":"node","kind":"node","package":"ccxt-cli","bins":["ccxt"]}]}} ---
You have access to the ccxt CLI tool which lets you interact with 100+ cryptocurrency exchanges (Binance, Bybit, OKX, Kraken, Coinbase, and many more). You can fetch market data, place orders, check balances, and stream live data.
ccxt <exchange_id> <methodName> [args...] [options]
If you're unsure about the required arguments for a method, run:
ccxt explain <methodName>
This will show you the required and optional arguments with descriptions.
| Flag | Purpose | |------|---------| | --verbose | Show raw request/response data | | --sandbox | Use testnet/sandbox environment | | --raw | Output clean JSON without formatting | | --swap | Target swap/perpetuals account | | --future | Target futures account | | --spot | Target spot account | | --option | Target options account | | --param key=value | Pass extra exchange-specific params (repeatable) | | --no-keys | Skip API key loading |
Fetch markets (list all trading pairs on an exchange):
ccxt <exchange> fetchMarkets --raw
Fetch a single ticker:
ccxt <exchange> fetchTicker "BTC/USDT" --raw
Fetch multiple tickers:
ccxt <exchange> fetchTickers --raw
Fetch order book:
ccxt <exchange> fetchOrderBook "BTC/USDT" --raw
Fetch OHLCV candles:
ccxt <exchange> fetchOHLCV "BTC/USDT" 1h undefined 10 --raw
Fetch recent trades:
ccxt <exchange> fetchTrades "BTC/USDT" --raw
Fetch exchange status:
ccxt <exchange> fetchStatus --raw
Fetch currencies:
ccxt <exchange> fetchCurrencies --raw
Create an order:
ccxt <exchange> createOrder "BTC/USDT" limit buy 0.001 50000 --raw
ccxt <exchange> createOrder "BTC/USDT" market buy 0.001 --raw
Create order with extra params:
ccxt <exchange> createOrder "BTC/USDT" limit buy 0.001 50000 --param stopPrice=49000 --raw
Cancel an order:
ccxt <exchange> cancelOrder "<order_id>" "BTC/USDT" --raw
Fetch open orders:
ccxt <exchange> fetchOpenOrders "BTC/USDT" --raw
Fetch closed orders:
ccxt <exchange> fetchClosedOrders "BTC/USDT" --raw
Fetch a specific order:
ccxt <exchange> fetchOrder "<order_id>" "BTC/USDT" --raw
Fetch balance:
ccxt <exchange> fetchBalance --raw
Fetch balance for derivatives:
ccxt <exchange> fetchBalance --swap --raw
Fetch my trades:
ccxt <exchange> fetchMyTrades "BTC/USDT" --raw
Fetch positions (derivatives):
ccxt <exchange> fetchPositions --swap --raw
Fetch deposit address:
ccxt <exchange> fetchDepositAddress "BTC" --raw
Fetch funding rate:
ccxt <exchange> fetchFundingRate "BTC/USDT:USDT" --raw
Fetch funding rate history:
ccxt <exchange> fetchFundingRateHistory "BTC/USDT:USDT" --raw
Fetch mark price / index price:
ccxt <exchange> fetchMarkOHLCV "BTC/USDT:USDT" 1h --raw
ccxt <exchange> fetchIndexOHLCV "BTC/USDT:USDT" 1h --raw
/ or : — e.g., "BTC/USDT", "BTC/USDT:USDT".undefined as a positional placeholder to skip optional arguments while providing later ones. For example: ccxt binance fetchOHLCV "BTC/USDT" 1h undefined 10 skips since but provides limit.--raw when you need to parse the output programmatically or when the user needs clean JSON.--sandbox for testing with testnet environments. Always recommend sandbox mode when the user is experimenting with orders."2025-01-01T00:00:00Z") are auto-converted to milliseconds.BINANCE_APIKEY, BINANCE_SECRET) or the config file. If a private method fails due to missing credentials, instruct the user to set them up."BASE/QUOTE:SETTLE" — e.g., "BTC/USDT:USDT" for USDT-margined perpetuals.createOrder. The CLI executes immediately with no confirmation prompt.fetchMarkets returns hundreds of entries), consider piping through | head or filtering, or suggest the user narrows their query.ccxt exchanges or refer to https://docs.ccxt.com.Tell users to configure credentials in one of two ways:
Option 1 — Environment variables:
export BINANCE_APIKEY=your_api_key
export BINANCE_SECRET=your_secret
Option 2 — Config file (path shown in ccxt --help):
{
"binance": {
"apiKey": "your_api_key",
"secret": "your_secret"
}
}
AuthenticationError, the API keys are missing or invalid.ExchangeNotAvailable or NetworkError, the exchange may be down or rate-limiting.BadSymbol, the trading pair doesn't exist on that exchange — use fetchMarkets to check available pairs.InsufficientFunds, the account doesn't have enough balance for the operation.安装 ccxt 后,可以对 AI 说这些话来触发它
Help me get started with ccxt
Explains what ccxt does, walks through the setup, and runs a quick demo based on your current project
Use ccxt to interact with 100+ cryptocurrency exchanges — fetch markets, order ...
Invokes ccxt with the right parameters and returns the result directly in the conversation
What can I do with ccxt in my finance & investment workflow?
Lists the top use cases for ccxt, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/ccxt/ 目录(个人级,所有项目可用),或 .claude/skills/ccxt/(项目级)。重启 AI 客户端后,用 /ccxt 主动调用,或让 AI 根据上下文自动发现并使用。
ccxt 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
ccxt 可免费安装使用。请查阅仓库了解许可证信息。
Interact with 100+ cryptocurrency exchanges — fetch markets, order books, tickers, place orders, check balances, and more using the CCXT CLI.
ccxt 属于「Finance & Investment」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my finance & investment tasks using ccxt
Identifies repetitive steps in your workflow and sets up ccxt to handle them automatically