CoinMarketCap JSON 应用程序编程接口(API)记录

版本1


公开应用程序编程接口(API)方法

代码

  • 端点: /ticker/
  • 方法: GET
  • 可选参数:
    • (int) start - return results from rank [start] and above
    • (int) limit - return a maximum of [limit] results (default is 100, use 0 to return all results)
    • (string) 转换 – 返回 价格, 24小时交易量, and 市场 cap 根据另一个加密货币。有效值是:
      "AUD", "BRL", "CAD", "CHF", "CLP", "CNY", "CZK", "DKK", "EUR", "GBP", "HKD", "HUF", "IDR", "ILS", "INR", "JPY", "KRW", "MXN", "MYR", "NOK", "NZD", "PHP", "PKR", "PLN", "RUB", "SEK", "SGD", "THB", "TRY", "TWD", "ZAR"
  • 例子: https://api.coinmarketcap.com/v1/ticker/
  • 例子: https://api.coinmarketcap.com/v1/ticker/?limit=10
  • 例子: https://api.coinmarketcap.com/v1/ticker/?start=100&limit=10
  • 例子: https://api.coinmarketcap.com/v1/ticker/?convert=EUR&limit=10
  • 抽样回复:
    [
        {
            "id": "bitcoin",
            "name": "Bitcoin",
            "symbol": "BTC",
            "rank": "1",
            "price_usd": "573.137",
            "price_btc": "1.0",
            "24h_volume_usd": "72855700.0",
            "market_cap_usd": "9080883500.0",
            "available_supply": "15844176.0",
            "total_supply": "15844176.0",
            "percent_change_1h": "0.04",
            "percent_change_24h": "-0.3",
            "percent_change_7d": "-0.57",
            "last_updated": "1472762067"
        },
        {
            "id": "ethereum",
            "name": "Ethereum",
            "symbol": "ETH",
            "rank": "2",
            "price_usd": "12.1844",
            "price_btc": "0.021262",
            "24h_volume_usd": "24085900.0",
            "market_cap_usd": "1018098455.0",
            "available_supply": "83557537.0",
            "total_supply": "83557537.0",
            "percent_change_1h": "-0.58",
            "percent_change_24h": "6.34",
            "percent_change_7d": "8.59",
            "last_updated": "1472762062"
        },
        ...
    ]                               

代码(具体货币)

  • 端点: /ticker/{id}/
  • 方法: GET
  • 可选参数:
    • (string) 转换 – 返回 价格, 24小时交易量, and 市场 cap 根据另一个加密货币。有效值是:
      "AUD", "BRL", "CAD", "CHF", "CLP", "CNY", "CZK", "DKK", "EUR", "GBP", "HKD", "HUF", "IDR", "ILS", "INR", "JPY", "KRW", "MXN", "MYR", "NOK", "NZD", "PHP", "PKR", "PLN", "RUB", "SEK", "SGD", "THB", "TRY", "TWD", "ZAR"
  • 例子: https://api.coinmarketcap.com/v1/ticker/bitcoin/
  • 例子: https://api.coinmarketcap.com/v1/ticker/bitcoin/?convert=EUR
  • 抽样回复:
    [
        {
            "id": "bitcoin",
            "name": "Bitcoin",
            "symbol": "BTC",
            "rank": "1",
            "price_usd": "573.137",
            "price_btc": "1.0",
            "24h_volume_usd": "72855700.0",
            "market_cap_usd": "9080883500.0",
            "available_supply": "15844176.0",
            "total_supply": "15844176.0",
            "max_supply": "21000000.0",
            "percent_change_1h": "0.04",
            "percent_change_24h": "-0.3",
            "percent_change_7d": "-0.57",
            "last_updated": "1472762067"
        }
    ]               
  • 抽样误差回复:
    {
        "error": "id not found"
    }                               

全球数据

  • 端点: /global/
  • 方法: GET
  • 可选参数:
    • (string) 转换 – 返回 24小时交易量, 和 市值 根据另一个加密货币。有效值是:
      "AUD", "BRL", "CAD", "CHF", "CLP", "CNY", "CZK", "DKK", "EUR", "GBP", "HKD", "HUF", "IDR", "ILS", "INR", "JPY", "KRW", "MXN", "MYR", "NOK", "NZD", "PHP", "PKR", "PLN", "RUB", "SEK", "SGD", "THB", "TRY", "TWD", "ZAR"
  • 例子: https://api.coinmarketcap.com/v1/global/
  • 例子: https://api.coinmarketcap.com/v1/global/?convert=EUR
  • 抽样回复:
    {
        "total_market_cap_usd": 201241796675,
        "total_24h_volume_usd": 4548680009,
        "bitcoin_percentage_of_market_cap": 62.54,
        "active_currencies": 896,
        "active_assets": 360,
        "active_markets": 6439,
        "last_updated": 1509909852
    }                       

历史数据

即将推出

付费API

即将推出 - 填写意向表接受发布通知

其他

限制

  • 请限制每分钟请求不超过10次。
  • 端点每五分钟更新一次。

最后更新记录

  • 2017年11月07日