> ## 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 DEX 和发射台活动对比

> 用 Lighthouse 在滚动时间窗口内对比 Solana DEX 和发射台的成交量、交易数、活跃钱包、代币发行和迁移数据。

Lighthouse 一次请求返回全市场的活动数据，可以在 `5m`、`1h`、`6h` 和 `24h` 窗口内比较成交量、交易数、钱包数、代币发行和迁移。

* 市场概览看板
* DEX 和发射台排行榜
* “现在哪里最活跃？”这类发现页
* 成交量和交易数趋势卡片
* Pump.fun、Raydium、Meteora 等交易场所对比

## 获取市场统计

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

数组中的每一项对应一个市场或一个市场系列的汇总：

```json theme={null}
{
  "market": "pumpfun",
  "label": "Pump.fun",
  "icon": "https://...",
  "url": "https://pump.fun",
  "stats": {
    "5m": {
      "transactions": {
        "total": 120,
        "buys": 72,
        "sells": 48,
        "changePct": 18.4
      },
      "wallets": {
        "total": 96,
        "changePct": 11.2
      },
      "volume": {
        "total": 185000,
        "buys": 112000,
        "sells": 73000,
        "changePct": 24.7
      },
      "tokensCreated": {
        "total": 34,
        "changePct": 8.1
      },
      "migrations": {
        "total": 5,
        "changePct": 25
      }
    }
  }
}
```

每个市场都包含相同的四个时间窗口：

```text theme={null}
5m   1h   6h   24h
```

`changePct` 比较当前窗口和上一个等长窗口。例如，`1h` 的变化值比较的是最近一小时和紧邻的前一小时。

## 构建市场排行榜

按某个指标对市场排序，例如近期成交量：

```javascript theme={null}
const response = await fetch(
  "https://data.solanatracker.io/lighthouse",
  {
    headers: {
      "x-api-key": process.env.SOLANA_TRACKER_API_KEY,
    },
  }
);

const markets = await response.json();

const byRecentVolume = markets
  .filter((market) => market.stats?.["1h"])
  .sort(
    (a, b) =>
      b.stats["1h"].volume.total - a.stats["1h"].volume.total
  );

for (const market of byRecentVolume.slice(0, 10)) {
  const stats = market.stats["1h"];
  console.log(
    `${market.label}: $${stats.volume.total.toLocaleString()} ` +
    `(${stats.volume.changePct >= 0 ? "+" : ""}${stats.volume.changePct}%)`
  );
}
```

## 创建市场概览卡片

用 `all` 市场做全站汇总，再比较各个市场：

```javascript theme={null}
const all = markets.find((market) => market.market === "all");
const pumpfun = markets.find((market) => market.market === "pumpfun");

function overview(market) {
  const stats = market?.stats?.["5m"];
  if (!stats) return null;

  return {
    label: market.label,
    volumeUsd: stats.volume.total,
    transactions: stats.transactions.total,
    wallets: stats.wallets.total,
    tokensCreated: stats.tokensCreated.total,
    migrations: stats.migrations.total,
    volumeChangePct: stats.volume.changePct,
  };
}

console.log(overview(all));
console.log(overview(pumpfun));
```

## 理解市场 ID

用 `market` 作为标识符，用 `label` 作为显示名称。条目可以代表一个交易场所、一个市场系列，或某个系列下的发射台：

| 市场 ID | 含义 |
| - | - |
| `all` | 所有已索引的市场 |
| `pumpfun` | Pump.fun 活动 |
| `raydium-all` | Raydium 系列汇总 |
| `meteora-curve:bags` | 某个市场系列下已发现的发射台 |

每个条目还包含：

* `label`：显示名称
* `icon`：品牌图标 URL（如有）
* `url`：项目或交易场所 URL（如有）
* `parent`：发射台子市场所属的父市场

`icon` 和 `url` 是可选的展示数据，没有品牌信息时可能为空。

## 处理零活动窗口

没有活动的窗口，各项指标都为零。没有上一窗口的活动可比较时，`changePct` 为 `0`：

```javascript theme={null}
const volume = market.stats["5m"].volume;

if (volume.total === 0) {
  console.log(`${market.label} is quiet right now`);
} else {
  console.log(`${market.label} has $${volume.total} in recent volume`);
}
```

> [card] [Lighthouse API 参考](https://docs.solanatracker.io/cn/data-api/lighthouse/solana-memecoin-market-stats.md)
>
> 查看端点、响应结构、时间窗口和市场字段。

> [card] [发现代币](https://docs.solanatracker.io/cn/guides/token-discovery.md)
>
> 从市场层面的信号转到代币层面的研究。

> [card] [发行与毕业](https://docs.solanatracker.io/cn/guides/pumpfun.md)
>
> 追踪 Pump.fun 的发行、联合曲线、毕业和兑换。

> [card] [巨鲸与 KOL 交易](https://docs.solanatracker.io/cn/guides/whale-kol.md)
>
> 关注推动大额活动的钱包。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.