EN ▼
Favorites
My Favorites
View All
Market Cap Price 24h%

Disclaimer: Content does not constitute investment advice. Trading involves risks—please invest with caution!

CoinMarketCap API 现每15秒更新最新加密货币价格

2026-11-06 06:44:50
Bookmark

CoinMarketCap API 更新频率提升:数据刷新速度加快

自 2026 年 11 月 2 日起,CoinMarketCap API 中的最新加密货币价格更新频率将从每 60 秒一次提升至每 15 秒一次。您无需申请新的密钥、使用新的端点或进行迁移:现有的调用即可返回更新更及时的数据。

实际影响示例

以您的交易机器人每 15 秒调用 /v3/cryptocurrency/listings/latest 接口获取 BTC 价格为例。在 11 月 1 日之前,由于数据每分钟仅更新一次,每四次调用中有三次返回的价格与上一次相同。而现在,每次调用都有可能返回全新的价格。

这就像机场的航班出发信息显示屏,从每分钟刷新一次变为每 15 秒刷新一次。需要注意的是,这种类比仅限于刷新频率:显示屏仅在每次刷新时展示快照,而非显示中间的所有细微变化,且部分端点还叠加了短暂的缓存机制。因此,部分接口的更新速率呈现为一个范围值。

哪些数据更新更快?

  • 每 15 秒更新一次(原为每 60 秒):
    • /v3/cryptocurrency/listings/latest:所有活跃加密货币的最新价格、市值、成交量及涨跌幅。
    • /v1/cryptocurrency/listings/new:最近新增加密货币的行情报价。
    • /v1/cryptocurrency/category:特定类别中加密货币的行情报价。
  • 每 15 至 25 秒更新一次:
    • /v3/cryptocurrency/quotes/latest:一个或多个加密货币的最新行情(原为每 60 秒)。
    • /v2/simple/price:轻量级的最新价格查询(原为每 60 秒)。
    • /v2/cryptocurrency/ohlcv/latest:收盘价(原为每 10 分钟)。
    • /v1/cryptocurrency/trending/latest、/trending/gainers-losers 和 /trending/most-visited:各榜单中代币的行情报价。

为何部分更新速率是一个范围?

对于更新速率呈现范围值的接口,数据本身每 15 秒刷新一次,但 API 会将每个报价缓存长达 10 秒。因此,您接收到的价格数据最旧可能达到 25 秒。

各端点的详细更新速率

API 参考文档现已列出每个端点的更新速率,以便您根据数据特性调整轮询策略。以下是一些需要特别注意的速率:

  • /v1/cryptocurrency/trending/gainers-losers 榜单:每 60 秒更新一次。
  • /v1/cryptocurrency/trending/most-visited 榜单:每 4 小时更新一次。
  • /v1/cryptocurrency/trending/latest 中的 30 天榜单:每 12 小时更新一次。默认第一页(start=1, limit=100, USD)的数据延迟最高可达 10 分钟。
  • /v2/cryptocurrency/ohlcv/latest 中的开盘价、最高价、最低价和成交量:每 5 至 7 分钟更新一次。
  • /v1/cryptocurrency/category 和 /v1/cryptocurrency/categories 中的分类统计数据:每 5 至 15 分钟更新一次。
  • 新上线的加密货币通常会在 10 分钟内出现在 /v1/cryptocurrency/listings/new 中。

应用场景建议

  • 交易工具与机器人:可以基于不超过 25 秒旧的价格数据执行操作。
  • 投资组合追踪器:能够全天保持资产余额与市场实时同步。
  • 价格警报:能够在关键价位被突破的瞬间附近触发警报。
  • 新闻网站与应用的小组件:行情Ticker 可以与市场动态保持步调一致。

开发者常见问题解答

我需要修改代码吗?

不需要。端点、参数以及 API 密钥均保持不变。

更频繁的轮询会消耗更多额度吗?

是的。每次调用都会根据其端点在 API 参考文档中列出的规则消耗相应额度。例如,每分钟调用四次将比每分钟调用一次消耗四倍的额度。建议在缩短轮询间隔前,检查您计划套餐中的月度可用额度。

哪些端点的更新频率保持不变?

历史数据端点、/v2/cryptocurrency/market-pairs/latest 以及 /v2/cryptocurrency/price-performance-stats/latest 的更新频率未发生变化。具体速率请查阅 API 参考文档。

在哪里可以查看具体的更新速率?

您可以在 API 参考文档中每个端点的“缓存/更新频率”说明中查看,也可以参考 v3.0.7 版本的更新日志。

Disclaimer:

All content published on this website, including hyperlinks, related applications, forums, blogs, and other media accounts, originates from third-party platforms and their users. CoinMarketInsight makes no representations or warranties of any kind regarding the website or its content. All blockchain-related data and materials are provided for informational and research purposes only and do not constitute financial, legal, or investment advice. Users and third parties are solely responsible for the content they publish. CoinMarketInsight shall not be liable for any losses arising from the use of this website. You should exercise caution and conduct your own independent research, review, analysis, and verification before making any decisions.

Read Full Article
More News
TOP

TOP