ccxt

GitHub

提供统一接口获取100+加密货币交易所的公开市场数据(如OHLCV、Ticker),无需API Key。作为OKX不可用时的备用数据源,支持自动分页与格式转换。

agent/src/skills/ccxt/SKILL.md HKUDS/Vibe-Trading

Trigger Scenarios

需要获取加密货币历史K线或实时行情 主数据源OKX不可用需切换备用源

Install

npx skills add HKUDS/Vibe-Trading --skill ccxt -g -y
More Options

Non-standard path

npx skills add https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/ccxt -g -y

Use without installing

npx skills use HKUDS/Vibe-Trading@ccxt

指定 Agent (Claude Code)

npx skills add HKUDS/Vibe-Trading --skill ccxt -a claude-code -g -y

安装 repo 全部 skill

npx skills add HKUDS/Vibe-Trading --all -g -y

预览 repo 内 skill

npx skills add HKUDS/Vibe-Trading --list

SKILL.md

Frontmatter
{
    "name": "ccxt",
    "category": "data-source",
    "description": "CCXT unified crypto exchange library (100+ exchanges). Free public market data. Fallback when OKX is unavailable."
}

Overview

CCXT is a unified cryptocurrency exchange trading library supporting 100+ exchanges including Binance, Bybit, OKX, Coinbase, Kraken, and more. Public market data (OHLCV, tickers, order books) requires no API key.

Quick Start

import ccxt

exchange = ccxt.binance({"enableRateLimit": True})

# Fetch daily OHLCV
ohlcv = exchange.fetch_ohlcv("BTC/USDT", "1d", limit=100)
# Returns: [[timestamp, open, high, low, close, volume], ...]

# Fetch ticker
ticker = exchange.fetch_ticker("ETH/USDT")
print(f"ETH price: {ticker['last']}")

Key Methods

Method Description Returns
fetch_ohlcv(symbol, timeframe, since, limit) Historical candles [[ts, o, h, l, c, v], ...]
fetch_ticker(symbol) Latest quote {last, bid, ask, volume, ...}
fetch_tickers(symbols) Batch quotes {symbol: ticker}
fetch_order_book(symbol, limit) Order book {bids, asks, timestamp}
fetch_trades(symbol, since, limit) Recent trades [{price, amount, side, timestamp}, ...]

Timeframes

1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 12h, 1d, 1w, 1M

Note: not all exchanges support all timeframes. Use exchange.timeframes to check.

Symbol Format

CCXT uses slash format: BTC/USDT, ETH/BTC, SOL/USDT

The project's DataLoader automatically converts BTC-USDT (hyphen) to BTC/USDT (slash).

Exchange Selection

Set via environment variable: CCXT_EXCHANGE=binance (default)

Popular exchanges: binance, bybit, okx, coinbase, kraken, bitget, gate

Built-in Loader

The project has a built-in CCXT DataLoader at backtest/loaders/ccxt_loader.py. It serves as a fallback when the OKX loader is unavailable.

Pagination

For long history, CCXT paginates via the since parameter (millisecond timestamp). The built-in loader handles this automatically (up to 200 pages).

Version History

  • 0aa45a9 Current 2026-07-24 17:44

Same Skill Collection

agent/src/skills/adr-hshare/SKILL.md
agent/src/skills/akshare/SKILL.md
agent/src/skills/alpha-zoo/SKILL.md
agent/src/skills/ashare-pre-st-filter/SKILL.md
agent/src/skills/asset-allocation/SKILL.md
agent/src/skills/backtest-diagnose/SKILL.md
agent/src/skills/behavioral-finance/SKILL.md
agent/src/skills/candlestick/SKILL.md
agent/src/skills/chanlun/SKILL.md
agent/src/skills/commodity-analysis/SKILL.md
agent/src/skills/corporate-events/SKILL.md
agent/src/skills/correlation-analysis/SKILL.md
agent/src/skills/correlation-regime/SKILL.md
agent/src/skills/cross-market-strategy/SKILL.md
agent/src/skills/crypto-derivatives/SKILL.md
agent/src/skills/data-routing/SKILL.md
agent/src/skills/defi-yield/SKILL.md
agent/src/skills/dividend-analysis/SKILL.md
agent/src/skills/doc-reader/SKILL.md
agent/src/skills/earnings-forecast/SKILL.md
agent/src/skills/earnings-revision/SKILL.md
agent/src/skills/eastmoney/SKILL.md
agent/src/skills/edgar-sec-filings/SKILL.md
agent/src/skills/elliott-wave/SKILL.md
agent/src/skills/event-driven/SKILL.md
agent/src/skills/execution-model/SKILL.md
agent/src/skills/factor-research/SKILL.md
agent/src/skills/fund-analysis/SKILL.md
agent/src/skills/fundamental-filter/SKILL.md
agent/src/skills/geopolitical-risk/SKILL.md
agent/src/skills/global-macro/SKILL.md
agent/src/skills/harmonic/SKILL.md
agent/src/skills/hedging-strategy/SKILL.md
agent/src/skills/hk-connect-flow/SKILL.md
agent/src/skills/ichimoku/SKILL.md
agent/src/skills/investor-lenses/SKILL.md
agent/src/skills/liquidation-heatmap/SKILL.md
agent/src/skills/macro-analysis/SKILL.md
agent/src/skills/market-microstructure/SKILL.md
agent/src/skills/minute-analysis/SKILL.md
agent/src/skills/ml-strategy/SKILL.md
agent/src/skills/mootdx/SKILL.md
agent/src/skills/multi-factor/SKILL.md
agent/src/skills/okx-market/SKILL.md
agent/src/skills/onchain-analysis/SKILL.md
agent/src/skills/options-advanced/SKILL.md
agent/src/skills/options-payoff/SKILL.md
agent/src/skills/options-strategy/SKILL.md
agent/src/skills/pair-trading/SKILL.md

Metadata

Files
0
Version
9806936
Hash
04fa9963
Indexed
2026-07-24 17:44

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-16 22:19
浙ICP备14020137号-1 $mapa de visitantes$