# 加密行情 代币排行 API (crypto_market.token_ranking)

- Canonical page: https://everyinfra.com/crypto-market-api/token_ranking
- Endpoint: POST /api/v1/social with {"platform": "crypto_market", "action": "token_ranking", "params": {...}}
- Price: $0.009597 per call ($9.6 per 1,000 requests); failed and empty results are not charged
- Returns: list, default 20, max 100 per call
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=crypto_market&action=token_ranking

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| category | enum: ai / ai_agents / base_eco / defi / depin / gaming / l1 / l2 / lst / meme / rwa / sol_eco / stablecoin | no | not declared | token_ranking 只看一个类别：MEME、AI、AI_AGENTS、L1、L2、DEFI、GAMING、STABLECOIN、RWA、DEPIN、SOL_ECO、BASE_ECO、LST。 |
| sort | enum: change_24h / market_cap / volume_24h | no | not declared | token_ranking 的排序：market_cap（默认，市值）、change_24h（24 小时涨跌，从市值前 250 里排）、volume_24h（24 小时成交额）。 |
| limit | integer (1–100) | no | 20 | 这次调用最多返回的条数，整数，1–100；不传按默认值，实际返回可能少于这个数。超过上限会在扣费前返回 422。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| rank | 在这次排行里的名次，从 1 开始（token_ranking）。 |
| slug | 代币短名（如 bitcoin）（token_ranking）。 |
| symbol | 代币符号（如 BTC、USDT）。 |
| name | 名称。用于账号/商品/商家类能力，指该对象本身的名字。 |
| price_usd | 价格，美元。 |
| change_24h_pct | 24 小时涨跌幅，百分比（0.76 即 +0.76%）。 |
| market_cap_usd | 流通市值，美元。 |
| volume_24h_usd | 24 小时成交额，美元。 |
| high_24h_usd | 24 小时最高价，美元。 |
| low_24h_usd | 24 小时最低价，美元。 |
| fdv_usd | 完全稀释估值，美元。 |
| circulating_supply | 流通量。 |
| total_supply | 总供应量。 |
| max_supply | 最大供应量；没有上限的代币没有这个字段。 |
| ath_usd | 历史最高价，美元。 |
| ath_at | 历史最高价时间，ISO 8601 UTC。 |
| atl_usd | 历史最低价，美元。 |
| atl_at | 历史最低价时间，ISO 8601 UTC。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "crypto_market",
  "action": "token_ranking",
  "params": {}
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "crypto_market",
        "action": "token_ranking",
        "params": {},
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

No real sample for these example parameters yet: structure only, every value is a placeholder (…).

```text
{
  "id": "req_…",
  "platform": "crypto_market",
  "action": "token_ranking",
  "results": [
    {
      "rank": …,
      "slug": …,
      "symbol": …,
      "name": …,
      "price_usd": …,
      "change_24h_pct": …,
      "market_cap_usd": …,
      "volume_24h_usd": …,
      "high_24h_usd": …,
      "low_24h_usd": …,
      "fdv_usd": …,
      "circulating_supply": …,
      "total_supply": …,
      "max_supply": …,
      "ath_usd": …,
      "ath_at": …,
      "atl_usd": …,
      "atl_at": …,
      "platform": …
    }
  ],
  "count": …,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=crypto_market
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
