cryptodataapi

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

CryptoDataAPI — crypto market analysis & backtesting playbook

CryptoDataAPI — 加密货币市场分析与回测手册

Use the CryptoDataAPI REST API (base
https://cryptodataapi.com/api/v1
) for live crypto market data, market regimes, derivatives, on-chain flows, a quant risk engine, and backtesting — one key, 180+ endpoints, 12 aggregated sources. If the
cryptodataapi
MCP tools are loaded, prefer those tool calls; otherwise call the REST endpoints directly (curl / requests) with the user's key.
使用 CryptoDataAPI REST API(基础地址
https://cryptodataapi.com/api/v1
)获取实时加密货币 市场数据、市场状态、衍生品、链上资金流、量化风险引擎及回测——只需一个密钥, 即可访问 180+ 个端点和 12 个聚合数据源。如果已加载
cryptodataapi
MCP 工具,优先使用这些工具调用;否则使用用户的密钥直接调用 REST 端点 (curl / requests)。

Auth

身份验证

  • Header on every request:
    X-API-Key: cdk_live_...
    . Read the key from the
    CRYPTODATA_API_KEY
    environment variable. (
    /health
    and
    /payments/plans
    need no key.)
  • No key yet? Create a free one, no signup:
    POST /api/v1/auth/keys
    with
    {"email":"you@example.com"}
    — the full key is returned once.
bash
curl -H "X-API-Key: $CRYPTODATA_API_KEY" https://cryptodataapi.com/api/v1/daily
  • Tiers (every tier is a complete product, not a teaser):
    • Free — the whole market-wide picture: health scores, regime reads, Fear & Greed, macro, ETF & stablecoin flows, BTC cycle indicators, 2,000+ coin profiles, and full-universe funding + open interest across all Hyperliquid perps, plus BTC-scoped order books & liquidations. 5 req/min, 50/day.
    • Pro — from $39/mo annual ($49/mo monthly). Adds the proprietary per-coin signals for every coin: quant regime & forward probabilities, dealer gamma (GEX), whale activity, trader positioning, full-universe liquidations / L2 books, trading indicators and strategy baskets. 30 req/min, 10,000/day.
    • Pro Plus — from $149/mo annual ($199/mo monthly). Adds the historical & bulk layer: the 2020→now regime archive (Parquet), a probability audit trail, and backtesting data. 60 req/min, unlimited daily.
  • Agents can subscribe autonomously with gasless USDC via
    POST /api/v1/payments/agent-subscribe
    (x402: 402 → sign off-chain → settle → key). See
    references/tiers-and-limits.md
    for plan slugs and the flow.
  • 每个请求都必须包含以下标头:
    X-API-Key: cdk_live_...
    。从
    CRYPTODATA_API_KEY
    环境变量读取密钥。(
    /health
    和
    /payments/plans
    无需密钥。)
  • 还没有密钥?创建一个免费密钥,无需注册:向
    POST /api/v1/auth/keys
    发送
    {"email":"you@example.com"}
    ——完整密钥仅会返回一次。
bash
curl -H "X-API-Key: $CRYPTODATA_API_KEY" https://cryptodataapi.com/api/v1/daily
  • 套餐层级(每个套餐都是完整产品,并非试用版):
    • Free — 完整的市场全景:健康度评分、市场状态判读、恐惧与贪婪指数、 宏观指标、ETF 与稳定币资金流、BTC 周期指标、2,000+ 个币种档案, 以及所有 Hyperliquid 永续合约的全量资金费率与持仓量,还包含 BTC 范围内的 订单簿和清算数据。5 次请求/分钟,50 次/天。
    • Pro — 年付套餐每月 $39 起(月付 $49/月)。为每一个币种增加专有信号: 量化市场状态与前瞻概率、dealer gamma(GEX)、巨鲸活动、交易者仓位、 全量币种的清算/L2 订单簿、技术指标和策略篮子。30 次请求/分钟,10,000 次/天。
    • Pro Plus — 年付套餐每月 $149 起(月付 $199/月)。增加历史与批量数据层: 2020 年至今的市场状态归档(Parquet)、概率审计轨迹及回测数据。 60 次请求/分钟,每日请求次数不限。
  • Agent 可以使用无 gas 的 USDC 自主订阅,调用
    POST /api/v1/payments/agent-subscribe
    (x402:402 → 签署链下支付 → 结算 → 获取密钥)。 套餐标识和完整流程参见
    references/tiers-and-limits.md
    。

Always start here

始终从这里开始

GET /api/v1/daily
— one cached call bundling market health, derivatives, sentiment, macro, ETF flows and cycle indicators. It replaces ~10 calls. Append
?format=markdown
to most endpoints for clean LLM context. Poll hourly, not per-tick.
GET /api/v1/daily
——通过一次缓存调用汇总市场健康度、衍生品、市场情绪、 宏观指标、ETF 资金流和周期指标,可替代约 10 次调用。向大多数端点附加
?format=markdown
,即可获得适合 LLM 使用的简洁上下文。按小时轮询,而不是 每次行情跳动都轮询。

The core loop: regime → strategy → risk → backtest

核心流程:市场状态 → 策略 → 风险 → 回测

  1. Read the regime —
    GET /regimes/current
    (10-state long-horizon cycle) and
    GET /quant/market
    (HMM market regime + calibrated probability buckets). (quant = Pro)
  2. Pick strategies —
    GET /trading-strategy-baskets
    (50 meta-baskets across 6 groups, each pre-mapped to the conditions it was built for). Use
    GET /regimes
    for the taxonomy. (Pro)
  3. Size the risk —
    GET /quant/coins/risk?horizon=24h
    returns, in one bulk call for the whole universe, each coin's regime, the volatility / liquidation_risk / funding / open_interest probability buckets, and a
    vol_target_multiplier
    (0.25–3.0). Honor
    meta.insufficient_history
    /
    meta.new_listing
    — mark those coins ineligible. (Pro)
  4. Backtest —
    GET /backtesting/daily-snapshots
    (available dates) and
    GET /backtesting/daily-snapshots/{date}
    (the full point-in-time
    /daily
    payload for that day, incl. frozen regime/health). Replay history to validate before going live. (Pro Plus)
  1. 判读市场状态——调用
    GET /regimes/current
    (10 状态的长期周期)和
    GET /quant/market
    (HMM 市场状态与校准后的概率区间)。(quant = Pro)
  2. 选择策略——调用
    GET /trading-strategy-baskets
    (50 个元策略篮子,分为 6 组, 每个篮子均预先映射至其适用的构建条件)。使用
    GET /regimes
    获取分类体系。(Pro)
  3. 确定风险规模——
    GET /quant/coins/risk?horizon=24h
    通过一次批量调用覆盖 全量币种,返回每个币种的市场状态、波动率/
    liquidation_risk
    /
    funding
    /
    open_interest
    概率分桶,以及
    vol_target_multiplier
    (0.25–3.0)。 应处理
    meta.insufficient_history
    /
    meta.new_listing
    ——将这些币种标记为不符合条件。(Pro)
  4. 回测——
    GET /backtesting/daily-snapshots
    (可用日期)和
    GET /backtesting/daily-snapshots/{date}
    (指定日期完整的时点
    /daily
    数据, 包含冻结的市场状态与健康度)。回放历史记录,在实盘前完成验证。(Pro Plus)

Go deeper

深入了解

  • Full endpoint reference (every domain, one line + tier per endpoint):
    references/endpoints.md
  • Worked workflows (copy-ready curl, expected fields):
    references/workflows.md
  • Tiers, rate limits, errors, x402 self-subscribe, MCP:
    references/tiers-and-limits.md
  • 完整端点参考(每个领域一行,并标注每个端点对应的套餐):
    references/endpoints.md
  • 实战工作流(可直接复制运行的 curl 和预期字段):
    references/workflows.md
  • 套餐、速率限制、错误、x402 自主订阅、MCP:
    references/tiers-and-limits.md

Conventions

约定

  • Respect the cache. Responses carry
    Cache-Control
    /
    X-Cache
    ; data refreshes on fixed cadences (1–30 min). Polling faster just wastes quota.
  • Batch, don't fan out. Use
    /quant/coins
    and
    /quant/coins/risk
    for the whole universe in one call instead of per-symbol loops.
  • Handle rate limits.
    429
    (with
    Retry-After
    ) = back off. Free 5/min · Pro 30/min · Pro Plus 60/min.
  • up + down + flat = 1 for directional probabilities — never treat
    1 - p_up
    as fall odds.
  • Watch
    X-API-Version
    (CalVer) to detect a response-shape change without diffing; the public JSON
    /changelog
    records notable ones.
  • 尊重缓存。 响应会携带
    Cache-Control
    /
    X-Cache
    ;数据按固定周期 (1–30 分钟)刷新。更快地轮询只会浪费配额。
  • 批量请求,不要扇出。 使用
    /quant/coins
    和
    /quant/coins/risk
    一次获取 全量币种的数据,避免按交易对逐一循环请求。
  • 处理速率限制。
    429
    (附带
    Retry-After
    )= 退避重试。Free 5 次/分钟 · Pro 30 次/分钟 · Pro Plus 60 次/分钟。
  • 对于方向概率,
    up + down + flat = 1
    ——切勿将
    1 - p_up
    视为下跌概率。
  • 关注
    X-API-Version
    (CalVer),无需进行差异比较即可检测响应结构变化; 公共 JSON
    /changelog
    会记录重要变更。

References

参考资料