> ## Documentation Index
> Fetch the complete documentation index at: https://docs.solanatracker.io/llms.txt
> Use this file to discover all available pages before exploring further.

# 代币发现

> 使用 Solana Tracker Data API 发现端点在 Solana 上查找新代币上线、热门代币、Pump.fun 毕业代币以及表现最佳的代币与机会。

Data API 提供了多个用于发现代币的端点。使用它们来构建代币扫描器、热门推送或研究面板。

## 最新代币

[latest tokens 端点](/cn/data-api/get-latest-tokens)返回 Solana 上最近创建的代币。

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://data.solanatracker.io/tokens/latest" \
    -H "x-api-key: YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const res = await fetch("https://data.solanatracker.io/tokens/latest", {
    headers: { "x-api-key": "YOUR_API_KEY" }
  });
  const tokens = await res.json();

  tokens.forEach(t => {
    console.log(`${t.token.name} (${t.token.symbol})`);
    console.log(`  Pool: ${t.pools[0]?.address}`);
    console.log(`  MC: $${t.pools[0]?.marketCap?.usd?.toLocaleString()}`);
  });
  ```

  ```python Python theme={null}
  import requests

  res = requests.get("https://data.solanatracker.io/tokens/latest",
      headers={"x-api-key": "YOUR_API_KEY"})

  for t in res.json():
      print(f"{t['token']['name']} ({t['token']['symbol']})")
  ```
</CodeGroup>

***

## 热门代币

[trending tokens 端点](/cn/data-api/get-trending-tokens)返回当前活动最多的代币。

```bash theme={null}
curl "https://data.solanatracker.io/tokens/trending" \
  -H "x-api-key: YOUR_API_KEY"
```

按时间范围过滤:

```bash theme={null}
# 过去一小时的热门
curl "https://data.solanatracker.io/tokens/trending/1h" \
  -H "x-api-key: YOUR_API_KEY"
```

***

## 按成交量排名的代币

[volume 端点](/cn/data-api/get-tokens-by-volume)按交易量对代币进行排名。

```bash theme={null}
# 总成交量领跑者
curl "https://data.solanatracker.io/tokens/volume" \
  -H "x-api-key: YOUR_API_KEY"

# 过去 24 小时的成交量
curl "https://data.solanatracker.io/tokens/volume/24h" \
  -H "x-api-key: YOUR_API_KEY"
```

***

## 表现最佳

[top performers 端点](/cn/data-api/get-top-performing-tokens)返回不同时间范围内涨幅最大的代币。

```bash theme={null}
# 过去一小时涨幅最大
curl "https://data.solanatracker.io/top-performers/1h" \
  -H "x-api-key: YOUR_API_KEY"

# 过去 24 小时涨幅最大
curl "https://data.solanatracker.io/top-performers/24h" \
  -H "x-api-key: YOUR_API_KEY"
```

***

## 毕业中的代币

[pump.fun](https://pump.fun) 上的代币会先经过联合曲线,然后再迁移到完整的 DEX 池。联合曲线是一种定价路径,代币在到达正常交易池之前,价格会随着买卖而变化。这些端点追踪这一进展。

### 当前正在毕业

[graduating tokens 端点](/cn/data-api/get-graduating-tokens)返回接近完成联合曲线的代币。

```bash theme={null}
curl "https://data.solanatracker.io/tokens/multi/graduating" \
  -H "x-api-key: YOUR_API_KEY"
```

### 已毕业

[graduated tokens 端点](/cn/data-api/get-graduated-tokens)返回已完成联合曲线并迁移到 DEX 的代币。

```bash theme={null}
curl "https://data.solanatracker.io/tokens/multi/graduated" \
  -H "x-api-key: YOUR_API_KEY"
```

***

## 搜索

[search 端点](/cn/data-api/token-search)按名称、符号或地址查找代币。支持过滤和排序。

<CodeGroup>
  ```bash cURL theme={null}
  # 按名称搜索
  curl "https://data.solanatracker.io/search?query=bonk" \
    -H "x-api-key: YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const res = await fetch(
    "https://data.solanatracker.io/search?query=bonk",
    { headers: { "x-api-key": "YOUR_API_KEY" } }
  );
  const results = await res.json();

  results.forEach(r => {
    console.log(`${r.token.name}: $${r.pools[0]?.price?.usd}`);
  });
  ```
</CodeGroup>

***

## 按部署者查询代币

[deployer 端点](/cn/data-api/get-tokens-by-deployer)返回由特定钱包创建的所有代币 — 对追踪连续部署者很有用。

```bash theme={null}
curl "https://data.solanatracker.io/deployer/{walletAddress}" \
  -H "x-api-key: YOUR_API_KEY"
```

***

## 代币概览

[token overview 端点](/cn/data-api/get-token-overview)返回所有受追踪代币的广泛市场概览。

```bash theme={null}
curl "https://data.solanatracker.io/tokens/multi/all" \
  -H "x-api-key: YOUR_API_KEY"
```

***

## 实时流

对于实时代币发现,请使用 [Datastream WebSocket](/cn/datastream/latesttokens) 频道:

| Room                  | 流式内容             |
| --------------------- | ---------------- |
| `latest`              | 新创建的代币(出现时即刻推送)  |
| `graduating`          | 接近毕业的代币          |
| `graduated`           | 刚毕业的代币           |
| `token:{token}`       | 池状态变化(价格、流动性、市值) |
| `stats:token:{token}` | 多时间范围统计          |

***

## 示例:构建代币扫描器

```javascript theme={null}
const headers = { "x-api-key": "YOUR_API_KEY" };

// 1. 获取热门代币
const trending = await fetch(
  "https://data.solanatracker.io/tokens/trending/1h", { headers }
).then(r => r.json());

// 2. 检查表现最佳
const gainers = await fetch(
  "https://data.solanatracker.io/top-performers/1h", { headers }
).then(r => r.json());

// 3. 交叉对比:既热门又是涨幅最大的代币
const gainerAddresses = new Set(gainers.map(g => g.token.mint));
const hotTokens = trending.filter(t => gainerAddresses.has(t.token.mint));

console.log(`${hotTokens.length} tokens are both trending and top gainers:`);
hotTokens.forEach(t => {
  console.log(`  ${t.token.name} (${t.token.symbol})`);
});
```

<CardGroup cols={2}>
  <Card title="代币研究" href="/cn/guides/token-research">
    深入了解任何代币:统计数据、持有者、交易和事件。
  </Card>

  <Card title="狙击检测" href="/cn/guides/sniper-detection">
    检查新代币是否存在可疑的早期买家活动。
  </Card>

  <Card title="代币发现流" href="/cn/guides/datastream-tokens">
    实时流式传输新代币、即将毕业的代币和曲线事件。
  </Card>

  <Card title="安全流" href="/cn/guides/datastream-safety">
    追踪新发现代币上的狙击者和 bundler。
  </Card>
</CardGroup>
