# 代币市场

**API:** Data API

**Endpoint:** `GET /v1/beta/coingecko/coins/markets`

**Tags:** CoinGecko

一次调用即可获取覆盖多个代币的排名市场表：每个代币一行，包含 `current_price`、`market_cap`、`market_cap_rank`、`total_volume`、`high_24h`、`low_24h`、`price_change_percentage_24h`、`circulating_supply`、`total_supply`、`max_supply`、`ath` 和 `atl` 及其日期，以及 `image`。可用 `per_page` 和 `page` 分页，`order` 排序（市值、成交量或 id，升序或降序），`ids` 或 `category` 收窄范围。传入 `price_change_percentage` 会增加对应的 `price_change_percentage_24h_in_currency` 字段。适用于排行榜和板块扫描。查询少量已知代币的价格时，`get_coingecko_simple_price` 轻量得多；查看单个代币的完整信息请使用 `get_coingecko_coins_id`。

### 计费参考

- 计量方式：套餐资源单位。
- 参考请求估算：0.008 美元。
- 单位成本基准：0.0 美元。
- 资源单位：`provider_credit`。
- 成本基准不构成最终客户价格，即使为零也不例外。

仅供参考的元数据，不是账户报价、保证价格或消费上限。资源额度不同于 Felo 额度。最终扣费以 Felo 计费记录为准。

## Base URL

- `https://openapi.felo.ai`

## Authentication

- `FeloBearerAuth` (http bearer, bearer format Felo API Key)
- `FeloApiKey` (apiKey in header `X-API-Key`)

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `category` | query | no | string | 按代币类别筛选。 *参见 [`/coins/categories/list`](/reference/coins-categories-list) |
| `ids` | query | no | string, default: "bitcoin" | 代币 ID，查询多个代币时以逗号分隔。 *参见 [`/coins/list`](/reference/coins-list) |
| `include_rehypothecated` | query | no | boolean | 在结果中包含再质押代币。为 true 时返回 `market_cap_rank_with_rehypothecated` 字段。 默认：false |
| `include_tokens` | query | no | string, enum: "top", "all" | 使用 `symbols` 查询时，指定 `all` 可包含所有匹配的代币。 默认的 `top` 返回按市值或成交量排名靠前的代币。 |
| `locale` | query | no | string, enum: "ar", "bg", "cs", "da", "de", "el", … | 语言背景。 默认：en |
| `names` | query | no | string, default: "Bitcoin" | 代币名称，查询多个代币时以逗号分隔。 |
| `order` | query | no | string, enum: "market_cap_asc", "market_cap_desc", "volume_asc", "volume_desc", "id_asc", "id_desc" | 按字段对结果排序。 默认：market_cap_desc |
| `page` | query | no | integer | 分页浏览结果。 默认：1 |
| `per_page` | query | no | integer | 每页结果总数。 默认：100 有效值：1...250 |
| `precision` | query | no | string, enum: "full", "0", "1", "2", "3", "4", … | 货币价格值的小数位数 |
| `price_change_percentage` | query | no | string | 包含价格变化百分比的时段，查询多个时段时以逗号分隔。 有效值：`1h`、`24h`、`7d`、`14d`、`30d`、`200d`、`1y` |
| `sparkline` | query | no | boolean | 包含 7 天 sparkline 数据。 默认：false |
| `symbols` | query | no | string, default: "btc" | 代币符号，查询多个代币时以逗号分隔。 |
| `vs_currency` | query | yes | string, default: "usd" | 代币和市场数据的计价货币。 *参见 [`/simple/supported_vs_currencies`](/reference/simple-supported-currencies) |

## Responses

### 200 — 带市场数据的代币列表

Headers:
- `X-Request-Id` (string) — 联系 Felo 支持时需提供的请求标识符。

**application/json**

Schema: `Response860C3Ae68Ea5_CoinsMarkets` (`#/components/schemas/Response860C3Ae68Ea5_CoinsMarkets`)

Example:

```json
[
  {
    "id": "bitcoin",
    "symbol": "btc",
    "name": "Bitcoin",
    "image": "https://coin-images.coingecko.com/coins/images/1/large/bitcoin.png?1696501400",
    "current_price": 77671,
    "market_cap": 1555886872303,
    "market_cap_rank": 1,
    "fully_diluted_valuation": 1555914058873,
    "total_volume": 33235034316,
    "high_24h": 78419,
    "low_24h": 76696,
    "price_change_24h": -747.3360347281705,
    "price_change_percentage_24h": -0.95302,
    "market_cap_change_24h": -15184401491.513184,
    "market_cap_change_percentage_24h": -0.9665,
    "circulating_supply": 20030493,
    "total_supply": 20030843,
    "max_supply": 21000000,
    "ath": 126080,
    "ath_change_percentage": -38.39571,
    "ath_date": "2025-10-06T18:57:42.558Z",
    "atl": 67.81,
    "atl_change_percentage": 114443.23093,
    "atl_date": "2013-07-06T00:00:00.000Z",
    "roi": null,
    "last_updated": "2026-05-18T12:49:21.599Z",
    "market_cap_rank_with_rehypothecated": 1,
    "sparkline_in_7d": {
      "price": [
        81045.84776489827,
        81001.73089268175,
        80898.20817826076
      ]
    },
    "price_change_percentage_1h_in_currency": 0.5823392426906319,
    "price_change_percentage_24h_in_currency": -0.9530164743774191,
    "price_change_percentage_7d_in_currency": -4.042267423689584,
    "price_change_percentage_14d_in_currency": -1.5720857443461431,
    "price_change_percentage_30d_in_currency": 1.9453890367549207,
    "price_change_percentage_200d_in_currency": -29.452371850925864,
    "price_change_percentage_1y_in_currency": -25.214612207475373
  }
]
```

### 400 — 无法处理该请求。请检查请求参数。

### 401 — 需要有效的 Felo API 密钥。

### 402 — 由于未满足计费要求，请求无法继续。

### 403 — 该账户无权执行此操作。

### 429 — 已达到请求或支出限额。

### 502 — 服务无法完成该请求。

### 503 — API 或计费服务暂时不可用。

### 504 — 服务在处理请求时超时。

### default — 错误响应；上游透传响应可能采用提供方格式

**application/json**

Schema:

```json
{}
```

## Schema definitions

### Response860C3Ae68Ea5_CoinsMarkets

`#/components/schemas/Response860C3Ae68Ea5_CoinsMarkets`

```json
{
  "type": "array",
  "items": {
    "type": "object",
    "required": [
      "id",
      "symbol",
      "name",
      "image",
      "current_price",
      "market_cap",
      "market_cap_rank",
      "fully_diluted_valuation",
      "total_volume",
      "high_24h",
      "low_24h",
      "price_change_24h",
      "price_change_percentage_24h",
      "market_cap_change_24h",
      "market_cap_change_percentage_24h",
      "circulating_supply",
      "total_supply",
      "max_supply",
      "ath",
      "ath_change_percentage",
      "ath_date",
      "atl",
      "atl_change_percentage",
      "atl_date",
      "roi",
      "last_updated"
    ],
    "properties": {
      "id": {
        "type": "string",
        "description": "代币 ID"
      },
      "symbol": {
        "type": "string",
        "description": "代币符号"
      },
      "name": {
        "type": "string",
        "description": "代币名称"
      },
      "image": {
        "type": "string",
        "description": "代币图片 URL"
      },
      "current_price": {
        "type": [
          "number",
          "null"
        ],
        "description": "目标货币下的当前价格"
      },
      "market_cap": {
        "type": [
          "number",
          "null"
        ],
        "description": "目标货币下的市值"
      },
      "market_cap_rank": {
        "type": [
          "integer",
          "null"
        ],
        "description": "市值排名"
      },
      "fully_diluted_valuation": {
        "type": [
          "number",
          "null"
        ],
        "description": "目标货币下的完全稀释估值"
      },
      "total_volume": {
        "type": [
          "number",
          "null"
        ],
        "description": "目标货币下的总交易量"
      },
      "high_24h": {
        "type": [
          "number",
          "null"
        ],
        "description": "目标货币下的 24 小时最高价"
      },
      "low_24h": {
        "type": [
          "number",
          "null"
        ],
        "description": "目标货币下的 24 小时最低价"
      },
      "price_change_24h": {
        "type": [
          "number",
          "null"
        ],
        "description": "目标货币下的 24 小时价格变动"
      },
      "price_change_percentage_24h": {
        "type": [
          "number",
          "null"
        ],
        "description": "24 小时价格涨跌幅"
      },
      "market_cap_change_24h": {
        "type": [
          "number",
          "null"
        ],
        "description": "目标货币下的 24 小时市值变动"
      },
      "market_cap_change_percentage_24h": {
        "type": [
          "number",
          "null"
        ],
        "description": "24 小时市值变动百分比"
      },
      "circulating_supply": {
        "type": [
          "number",
          "null"
        ],
        "description": "流通供应量"
      },
      "total_supply": {
        "type": [
          "number",
          "null"
        ],
        "description": "总供应量"
      },
      "max_supply": {
        "type": [
          "number",
          "null"
        ],
        "description": "最大供应量"
      },
      "ath": {
        "type": [
          "number",
          "null"
        ],
        "description": "目标货币下的历史最高价"
      },
      "ath_change_percentage": {
        "type": [
          "number",
          "null"
        ],
        "description": "历史最高价变化百分比"
      },
      "ath_date": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time",
        "description": "历史最高价日期"
      },
      "atl": {
        "type": [
          "number",
          "null"
        ],
        "description": "目标货币下的历史最低价"
      },
      "atl_change_percentage": {
        "type": [
          "number",
          "null"
        ],
        "description": "历史最低价变化百分比"
      },
      "atl_date": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time",
        "description": "历史最低价日期"
      },
      "roi": {
        "type": [
          "object",
          "null"
        ],
        "description": "投资回报率数据",
        "properties": {
          "times": {
            "type": "number",
            "description": "投资回报率倍数"
          },
          "currency": {
            "type": "string",
            "description": "投资回报率货币"
          },
          "percentage": {
            "type": "number",
            "description": "投资回报率百分比"
          }
        }
      },
      "last_updated": {
        "type": "string",
        "format": "date-time",
        "description": "最后更新时间戳"
      },
      "market_cap_rank_with_rehypothecated": {
        "type": [
          "integer",
          "null"
        ],
        "description": "包含再抵押代币的市值排名"
      },
      "sparkline_in_7d": {
        "type": "object",
        "description": "最近 7 天的 sparkline 价格数据",
        "properties": {
          "price": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "价格值数组"
          }
        }
      },
      "price_change_percentage_1h_in_currency": {
        "type": [
          "number",
          "null"
        ],
        "description": "目标货币下的 1 小时价格涨跌幅"
      },
      "price_change_percentage_24h_in_currency": {
        "type": [
          "number",
          "null"
        ],
        "description": "目标货币下的 24 小时价格涨跌幅"
      },
      "price_change_percentage_7d_in_currency": {
        "type": [
          "number",
          "null"
        ],
        "description": "目标货币下的 7 天价格涨跌幅"
      },
      "price_change_percentage_14d_in_currency": {
        "type": [
          "number",
          "null"
        ],
        "description": "目标货币下的 14 天价格涨跌幅"
      },
      "price_change_percentage_30d_in_currency": {
        "type": [
          "number",
          "null"
        ],
        "description": "目标货币下的 30 天价格涨跌幅"
      },
      "price_change_percentage_200d_in_currency": {
        "type": [
          "number",
          "null"
        ],
        "description": "目标货币下的 200 天价格涨跌幅"
      },
      "price_change_percentage_1y_in_currency": {
        "type": [
          "number",
          "null"
        ],
        "description": "目标货币下的 1 年价格涨跌幅"
      }
    }
  }
}
```
