---
title: "喊单事件"
canonical_url: "https://tweetstream.io/zh-cn/docs/callouts"
last_updated: 2026-09-24
---

# 喊单事件

通过 WebSocket 接收 pump.fun 喊单、作者更新、回复和转发。收到第一个事件就提醒，随后合并通常在几秒内到达的完整详情。

Canonical URL: https://tweetstream.io/zh-cn/docs/callouts

## 选择喊单账号

在喊单标签页中使用 pump.fun 用户名、Solana 钱包或个人主页链接添加账号。标签可选。

- 账号使用 Solana 钱包，与代币所在链无关。
- Minimum：10 个账号。Pro、Scale 和 Ultra Speed：100 个。等待添加的账号也计入上限。

## account/callout

收到即提醒。`d.platform` 为 `pump_fun`，喊单者用户名和代币地址必有。

第一个事件可能缺少代币名称、市值、SOL 和 USD 价格、喊单者持仓（持有量、成本、价值和盈亏）以及附带媒体。作者更新的 `d.text` 可能只是截短的预览。完整喊单随后以 `account/callout_update` 发送。

可选的 `d.token.chainId` 使用 CAIP-2：Solana 主网为 `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`；EVM 链如 `eip155:56`、`eip155:999`、`eip155:4663` 或 `eip155:8453`。缺失时表示未指定链。

文本、媒体、头像、持仓、代币详情和价格均可选。`d.caller.image` 是账号头像，`d.token.image` 是代币图片。

- 可选的 `d.kind`：`callout`、`author_update`、`reply` 或 `repost`。作者更新是原作者的新帖子，不是元数据补充。
- `d.caller` 是被跟踪的行为发起者。`d.reference` 保留原作者、文本和媒体；`d.reference.reply` 保留被转发的回复及其作者。两者都不是转发者。
- `replyId` 标识回复或作者更新。可选的 `parentReplyId` 和 `rootReplyId` 保留回复关系；`calloutId` 标识原始喊单。
- 价格使用精确十进制字符串：`calloutPrice` 和 `maxPriceSol` 以 SOL 计价，`calloutPriceUsd` 和 `maxPriceUsd` 以 USD 计价。请保留字符串或使用十进制库。USD 价格存在不代表 SOL 价格也存在。
- `marketCapUsd` 和 `multiple` 是可选数值。持仓值使用精确十进制字符串：`amountHeld` 为代币数量，`pnlPercentage` 为百分比，`*Usd` 字段为 USD 金额。

### 喊单事件类型

```typescript
type CalloutCaller = {
  username: string;
  image?: string;
};

type CalloutReply = {
  caller: CalloutCaller;
  replyId: string;
  parentReplyId?: string;
  rootReplyId?: string;
  text?: string;
  mediaUrl?: string;
};

type CalloutEvent = {
  platform: 'pump_fun';
  caller: CalloutCaller;
  kind?: 'callout' | 'author_update' | 'reply' | 'repost';
  text?: string;
  mediaUrl?: string;
  // Required for replies and author updates.
  replyId?: string;
  parentReplyId?: string;
  rootReplyId?: string;
  reference?: {
    caller: CalloutCaller;
    text?: string;
    mediaUrl?: string;
    reply?: CalloutReply;
  };
  position?: {
    amountHeld?: string;
    valueUsd?: string;
    costBasisUsd?: string;
    pnlUsd?: string;
    pnlPercentage?: string;
    realizedPnlUsd?: string;
  };
  token: {
    address: string;
    chainId?: string;
    symbol?: string;
    name?: string;
    image?: string;
  };
  url?: string;
  marketCapUsd?: number;
  // SOL, exact decimal.
  calloutPrice?: string;
  // USD, exact decimal.
  calloutPriceUsd?: string;
  multiple?: number;
  // SOL peak, exact decimal.
  maxPriceSol?: string;
  // USD peak, exact decimal.
  maxPriceUsd?: string;
  calloutId: string;
  createdAt: number;
  receivedAt?: number;
};

type CalloutUpdateEvent = CalloutEvent & {
  // Original envelope id, not calloutId.
  updateOf: string;
};

type PerpCalloutEvent = {
  platform: 'pump_fun';
  caller: CalloutCaller;
  // The perpetual market and the original callout's stance.
  market: {
    // For example 'hyperliquid'.
    venue: string;
    // The venue's market symbol, case kept: 'BTC', 'xyz:CL'.
    symbol: string;
    name?: string;
    image?: string;
    side: 'long' | 'short';
    // Exact decimal multiplier, for example '10' or '2.5'.
    leverage: string;
    // USD, exact decimals.
    entryPriceUsd?: string;
    closePriceUsd?: string;
    closedAt?: number;
  };
  kind?: 'callout' | 'author_update' | 'reply' | 'repost';
  text?: string;
  mediaUrl?: string;
  // Required for replies and author updates.
  replyId?: string;
  parentReplyId?: string;
  rootReplyId?: string;
  reference?: CalloutEvent['reference'];
  // The acting account's position snapshot, exact decimals.
  // market.side is the original callout's stance, not this position's direction.
  position?: {
    // Coin units.
    size?: string;
    notionalUsd?: string;
    marginUsd?: string;
    pnlUsd?: string;
    // Of margin.
    pnlPercentage?: string;
    realizedPnlUsd?: string;
  };
  // USD, exact decimal.
  calloutPriceUsd?: string;
  // Return multiple, leverage included.
  multiple?: number;
  calloutId: string;
  createdAt: number;
  receivedAt?: number;
};
```

### 第一个喊单事件

```json
{
  "v": 1,
  "t": "account",
  "op": "callout",
  "id": "callout.0123456789abcdef0123",
  "ts": 1772000001060,
  "d": {
    "platform": "pump_fun",
    "caller": {
      "username": "CryptoCalls",
      "image": "https://cdn.example/avatar.png"
    },
    "kind": "callout",
    "text": "Watching this token.",
    "token": {
      "address": "So11111111111111111111111111111111111111112",
      "chainId": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
      "symbol": "ABC"
    },
    "url": "https://pump.fun/callouts/So11111111111111111111111111111111111111112/9ab3177c-7b35-4d99-9cca-8b426f74a270",
    "calloutId": "9ab3177c-7b35-4d99-9cca-8b426f74a270",
    "createdAt": 1772000001000,
    "receivedAt": 1772000001050
  }
}
```

### 转发其他作者的回复

```json
{
  "v": 1,
  "t": "account",
  "op": "callout",
  "id": "callout.repost-example",
  "ts": 1772000003060,
  "d": {
    "platform": "pump_fun",
    "kind": "repost",
    "caller": { "username": "MarketReader" },
    "token": { "address": "So11111111111111111111111111111111111111112" },
    "calloutId": "9ab3177c-7b35-4d99-9cca-8b426f74a270",
    "createdAt": 1772000003000,
    "reference": {
      "caller": { "username": "CryptoCalls" },
      "text": "Watching this token.",
      "reply": {
        "caller": { "username": "ReplyAuthor" },
        "replyId": "reply-example",
        "text": "Watching the volume too."
      }
    }
  }
}
```

## account/callout_update

该事件通常在几秒内到达，携带完整喊单，包括第一个事件缺少的详情。将其合并到原条目，不再触发提醒。

- 按本次信封的 `id` 去重。`d.updateOf` 指向原始信封 `id`，不是 `calloutId`。
- 仅合并本次提供的字段，包括嵌套的 `caller`、`token`、`position` 和 `reference` 字段。缺失字段不删除旧值。
- 找不到原事件时，存储或忽略更新，不要把它当作新喊单。
- 更新可选，即使没有更新也应展示初始内容。

### 包含完整详情的后续事件

```json
{
  "v": 1,
  "t": "account",
  "op": "callout_update",
  "id": "callout_update.556abf0021a7ff937a1a804ec0a0c245d497bcc6090af66179e74ce03c0970e0",
  "ts": 1772000001840,
  "d": {
    "platform": "pump_fun",
    "updateOf": "callout.0123456789abcdef0123",
    "caller": { "username": "CryptoCalls" },
    "kind": "callout",
    "mediaUrl": "https://cdn.example/chart.png",
    "token": {
      "address": "So11111111111111111111111111111111111111112",
      "symbol": "ABC",
      "name": "Alpha Beta",
      "image": "https://cdn.example/token.png"
    },
    "marketCapUsd": 156230.75,
    "calloutPrice": "0.00000125",
    "calloutPriceUsd": "0.00018750",
    "position": {
      "amountHeld": "2500000",
      "costBasisUsd": "312.50",
      "valueUsd": "468.75",
      "pnlUsd": "156.25",
      "pnlPercentage": "50"
    },
    "calloutId": "9ab3177c-7b35-4d99-9cca-8b426f74a270",
    "createdAt": 1772000001000
  }
}
```

### 只提醒一次，然后合并

```typescript
type Json = Record<string, unknown>;

type CalloutMessage =
  | { op: 'callout'; id: string; d: CalloutEvent }
  | { op: 'callout_update'; id: string; d: CalloutUpdateEvent };

declare function sendAlert(callout: CalloutEvent): void;

const isObject = (value: unknown): value is Json =>
  typeof value === 'object' && value !== null && !Array.isArray(value);

// Supplied fields win, nested objects merge, omitted fields keep their value.
function merge(row: Json, details: Json): Json {
  const merged: Json = { ...row };
  for (const [key, value] of Object.entries(details)) {
    const current = merged[key];
    merged[key] = isObject(current) && isObject(value) ? merge(current, value) : value;
  }
  return merged;
}

// One row per callout, keyed by the first event's envelope id.
const rows = new Map<string, Json>();

function handleCallout(message: CalloutMessage) {
  if (message.op === 'callout') {
    if (rows.has(message.id)) return;
    rows.set(message.id, message.d);
    sendAlert(message.d);
    return;
  }
  // Fill in the row from the first event. Never alert here.
  const { updateOf, ...details } = message.d;
  const row = rows.get(updateOf);
  if (row) rows.set(updateOf, merge(row, details));
}
```

## account/perp_callout

永续合约市场上的喊单以此操作发送，绝不会以 `account/callout` 发送。`d.market` 取代 `d.token`，因此现货代币的处理函数不会收到永续合约喊单。

- `d.market` 是原始喊单的立场：`venue`（如 `hyperliquid`）、保留大小写的市场 `symbol`（`BTC`、`xyz:CL`）、`side`（`long` 或 `short`），以及精确十进制倍数 `leverage`。可选的 `entryPriceUsd`、`closePriceUsd` 和 `closedAt` 补充立场信息。
- `d.kind`、`replyId` 和 `reference` 与 `account/callout` 相同。回复或转发携带原始喊单的 `market`，而不是回复者的。
- 可选的 `d.position` 是行为发起者的持仓快照，使用精确十进制字符串：`size` 以币为单位、`notionalUsd`、`marginUsd`、`pnlUsd`、占保证金百分比的 `pnlPercentage` 以及 `realizedPnlUsd`。`market.side` 是原始喊单的立场，并非该持仓的方向。
- `calloutPriceUsd` 是喊单时的市场价格。`multiple` 是包含杠杆的收益倍数。
- 永续合约喊单之后不会有 `account/callout_update`。按信封 `id` 去重。

### 永续合约喊单

```json
{
  "v": 1,
  "t": "account",
  "op": "perp_callout",
  "id": "callout.0123456789abcdef0123",
  "ts": 1772000001060,
  "d": {
    "platform": "pump_fun",
    "caller": {
      "username": "CryptoCaller"
    },
    "market": {
      "venue": "hyperliquid",
      "symbol": "ZEC",
      "name": "Zcash",
      "side": "long",
      "leverage": "10",
      "entryPriceUsd": "1155.0967741935483"
    },
    "calloutPriceUsd": "1138.8",
    "multiple": 0.8056,
    "text": "Thesis text",
    "kind": "callout",
    "position": {
      "size": "0.31",
      "notionalUsd": "351.85",
      "marginUsd": "32.053309",
      "pnlUsd": "-6.229999999999973",
      "pnlPercentage": "-19.436370828359635",
      "realizedPnlUsd": "0"
    },
    "calloutId": "b7cccaa0-6ca2-46b8-bad4-79688a083be6",
    "createdAt": 1772000001000,
    "receivedAt": 1772000001050
  }
}
```

## 使用标识符和时间戳

回复和转发有各自的信封 ID，但共享原始 `calloutId`。按信封 `id` 去重。

- `d.createdAt`：动态创建时间。
- `d.receivedAt`：可选的 TweetStream 接收时间。
- 信封 `ts`：准备发送的时间。
