> ## 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.

# 狙击者与 Bundler 检测

> 使用 Solana Tracker Data API 在 Solana 代币上查找早期买家、检测打包上线、识别内部地址并标记可疑钱包与异常买入模式。

狙击者(snipers)和 bundler 在 Solana 上很常见。狙击者是在上线最初几秒内买入的钱包。Bundler 将交易组合在一起,通常用于控制顺序或获得早期访问权。这可能涉及 MEV,即从交易顺序中获利。Data API 为您提供了多个端点来检测此类活动。

## 首批买家

[PnL V2 first buyers 端点](/cn/data-api/pnl-v2/get-token-first-buyers)按时间顺序返回首批买家,并附带钱包 PnL、代币 PnL、身份标签和当前持仓状态。

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://data.solanatracker.io/v2/pnl/tokens/{token}/first-buyers?limit=50" \
    -H "x-api-key: YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const token = "38PgzpJYu2HkiYvV8qePFakB8tuobPdGm2FFEn7Dpump";

  const res = await fetch(
    `https://data.solanatracker.io/v2/pnl/tokens/${token}/first-buyers?limit=50`,
    { headers: { "x-api-key": "YOUR_API_KEY" } }
  );
  const { traders } = await res.json();

  traders.forEach((t, i) => {
    console.log(`#${i + 1} ${t.wallet} — first trade ${new Date(t.timing.firstTrade).toISOString()}`);
    console.log(`Token PnL: $${t.pnl.token.total.toFixed(2)}, balance: ${t.position.balance}`);
  });
  ```
</CodeGroup>

***

## 查找已卖出的狙击者

使用相同的响应找出已经退出并实现利润的早期买家。

```javascript theme={null}
const token = "38PgzpJYu2HkiYvV8qePFakB8tuobPdGm2FFEn7Dpump";

const res = await fetch(
  `https://data.solanatracker.io/v2/pnl/tokens/${token}/first-buyers?limit=50`,
  { headers: { "x-api-key": "YOUR_API_KEY" } }
);
const { traders } = await res.json();

// Find snipers who already sold
const sold = traders.filter(t => t.position.balance === 0 && t.pnl.token.realized > 0);

console.log(`${sold.length} early buyers already sold at a profit`);
sold.forEach(t => {
  const holdMins = (t.timing.lastTrade - t.timing.firstTrade) / 60000;
  console.log(`  ${t.wallet}: +$${t.pnl.token.realized.toFixed(2)}, held ${holdMins.toFixed(0)} minutes`);
});
```

### 关注哪些信号

| 信号            | 含义                |
| ------------- | ----------------- |
| 余额 = 0,利润 > 0 | 快速买入且已卖出的早期买家     |
| 持有时间 \< 5 分钟  | 可能是自动化或 MEV 风格的行为 |
| 多次出现为首批买家     | 同一钱包狙击多个上线        |
| 相对于池的大笔买入     | 推动价格的巨鲸入场         |

***

## Bundler 检测

[bundlers 端点](/cn/data-api/get-token-bundlers)识别参与代币打包交易的钱包。

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

Bundler 在单个区块中提交多笔交易以控制执行顺序。常用于:

* 上线狙击(在添加流动性的同一区块内买入)
* 三明治攻击
* 协同钱包集群

***

## 基于图表的检测

这些端点提供随时间聚合的数据,便于构建可视化面板。

### 狙击者活动图

[snipers chart](/cn/data-api/get-snipers-chart-data) 显示代币的狙击者活动随时间变化。

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

### Bundler 活动图

[bundlers chart](/cn/data-api/get-bundlers-chart-data) 追踪打包交易活动随时间变化。

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

### 内部人活动图

[insiders chart](/cn/data-api/get-insiders-chart-data) 显示内部人钱包活动模式。

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

***

## 示例:完整狙击者报告

为任意代币构建快速狙击者报告:

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

// 1. Get first buyers with PnL data
const { traders } = await fetch(
  `https://data.solanatracker.io/v2/pnl/tokens/${token}/first-buyers?limit=50`,
  { headers }
).then(r => r.json());

// 2. Get bundler data
const bundlers = await fetch(
  `https://data.solanatracker.io/tokens/${token}/bundlers`,
  { headers }
).then(r => r.json());

// 3. Analyze
const snipers = traders.filter(t => {
  const holdMins = (t.timing.lastTrade - t.timing.firstTrade) / 60000;
  return holdMins < 10 && t.pnl.token.realized > 0;
});

const bundlerWallets = new Set(bundlers.map(b => b.wallet));
const sniperBundlers = snipers.filter(s => bundlerWallets.has(s.wallet));

console.log(`First 50 buyers: ${traders.length}`);
console.log(`Quick-flip snipers (< 10 min hold, profitable): ${snipers.length}`);
console.log(`Bundler wallets: ${bundlers.length}`);
console.log(`Snipers who also bundled: ${sniperBundlers.length}`);
```

<CardGroup cols={2}>
  <Card title="代币研究" href="/cn/guides/token-research">
    完整代币查询:统计、持有者、交易和事件。
  </Card>

  <Card title="代币情报" href="/cn/guides/pnl-v2/token-intelligence">
    代币上所有交易者的 PnL、排序和过滤。
  </Card>

  <Card title="安全流" href="/cn/guides/datastream-safety">
    通过 WebSocket 实时追踪狙击者、bundler 和内部人。
  </Card>

  <Card title="代币发现流" href="/cn/guides/datastream-tokens">
    在大众之前发现新代币并按毕业状态过滤。
  </Card>
</CardGroup>
