Subscribe
After connecting, send a subscribe message to start receiving transactions.
Subscribe Message
Section titled “Subscribe Message”{"type": "subscribe", "filters": {"platform": ["pump_fun"], "eventType": ["create"]}}Filter Fields
Section titled “Filter Fields”| Field | Required | Example |
|---|---|---|
platform | Yes | "pump_fun", "pump_swap" |
eventType | No | "trade", "create", "migrate", "liquidity" |
mint | No | "5UUH9..." |
pool | No | "8sLbN..." (Pump Swap only) |
user | No | "9WzDX..." |
Filter Logic
Section titled “Filter Logic”- AND between fields — must match all specified fields
- OR within arrays — matches any value in the array
Example
Section titled “Example”{ "platform": ["pump_fun", "pump_swap"], "mint": ["TokenA", "TokenB"]}Matches: (pump_fun OR pump_swap) AND (TokenA OR TokenB)
You will receive messages for all trades that happen on both platforms but only on tokens TokenA or TokenB.
Common Filters
Section titled “Common Filters”All Pump Fun token launches:
{"type": "subscribe", "filters": {"platform": ["pump_fun"], "eventType": ["create"]}}Track 3 tokens on both platforms:
{"type": "subscribe", "filters": {"platform": ["pump_fun", "pump_swap"], "mint": ["Token1...", "Token2...", "Token3..."]}}Watch 2 wallets on Pump Fun:
{"type": "subscribe", "filters": {"platform": ["pump_fun"], "user": ["Wallet1...", "Wallet2..."]}}Subscription Confirmation
Section titled “Subscription Confirmation”{ "type": "subscriptionUpdated", "activeFilter": {"platform": ["pump_fun"]}, "message": "Subscription active with 1 filter field(s)"}Transaction Message Format
Section titled “Transaction Message Format”All messages have the same top-level structure:
type: Always"transaction"data: Object containing transaction details with:- Base fields (always present):
platform: Name of the DEX platform (string, e.g.,"pump_fun")signature: Transaction signature (string)slot: Solana slot number (number)instructionIndex: Index of the instruction (string, e.g.,"1","3.2")instruction: The instruction name (string, e.g.,"buy")eventType: Type of event (string, e.g.,"trade")user: Wallet address that initiated the transaction (string)
- Additional fields vary by event type and platform (see examples below)
- Base fields (always present):
timestamp: Unix timestamp in milliseconds
Example Response Messages
Section titled “Example Response Messages”Select a platform and event type to see the complete message structure with all fields:
{ "type": "transaction", "data": { "platform": "pump_fun", "signature": "5Z3k...", "slot": 298765432, "instructionIndex": "0", "instruction": "create", "eventType": "create", "user": "9WzDX...", "mint": "5UUH9...", "tokenName": "My Token", "symbol": "TOKEN", "uri": "https://...", "isMayhemMode": false, "isCashback": false }, "timestamp": 1734278400000}{ "type": "transaction", "data": { "platform": "pump_fun", "signature": "2aB4...", "slot": 298765433, "instructionIndex": "0", "instruction": "buy", "eventType": "trade", "user": "7xKXt...", "inputMint": "So11111111111111111111111111111111111111111", "outputMint": "5UUH9...", "inputAmount":0.22602469, "outputAmount":1713934.292847, "priceInSol":1.32e-7, // price of 1 token in SOL "marketCapInSol":132.334, "bondingCurveProgress":0.73, // 73% "isMayhemMode": false, "isCashback": false }, "timestamp": 1734278401000}{ "type": "transaction", "data": { "platform": "pump_fun", "signature": "kYxo...", "slot": 298765435, "instructionIndex": "0", "instruction": "completePumpAmmMigration", "eventType": "migrate", "user": "8cA18...", "mint": "5UUH9...", "pool": "8sLbN...", "solAmount": 85.5, "mintAmount": 206900000 }, "timestamp": 1734278403000}{ "type": "transaction", "data": { "platform": "pump_swap", "signature": "4fZ9...", "slot": 298765437, "instructionIndex": "0", "instruction": "createPool", "eventType": "create", "user": "6pR4...", "baseMint": "2emjy...", "quoteMint": "So11111111111111111111111111111111111111111", "lpMint": "9xLp...", "poolBaseAmount": 206900000, "poolQuoteAmount": 85.5, "coinCreator": "3nK1...", "isMayhemMode": false, "pool": "8sLbN..." }, "timestamp": 1734278405000}{ "type": "transaction", "data": { "platform": "pump_swap", "signature": "3vW7...", "slot": 298765436, "instructionIndex": "0", "instruction": "buy", "eventType": "trade", "user": "5Qbv8...", "inputMint": "So11111111111111111111111111111111111111111", "outputMint": "2emjy...", "inputAmount":2420.289807, "outputAmount":0.594025728, "priceInSol":0.00024615, // price of 1 token in SOL "isCashback": false, "pool": "8sLbN..." }, "timestamp": 1734278404000}{ "type": "transaction", "data": { "platform": "pump_swap", "signature": "3aSm...", "slot": 298765439, "instructionIndex": "0", "instruction": "withdraw", "eventType": "liquidity", "user": "8zU5...", "baseMint": "2emjy...", "quoteMint": "So11111111111111111111111111111111111111111", "lpMint": "9xLp...", "baseAmountOut": 500000, "quoteAmountOut": 2.5, "lpTokenAmountIn": 250000, "lpMintSupply": 1250000, "poolBaseTokenReserves": 207400000, "poolQuoteTokenReserves": 88.0, "pool": "8sLbN..." }, "timestamp": 1734278407000}Updating Subscriptions
Section titled “Updating Subscriptions”Send a new subscribe message to replace your current filters.
Limits
Section titled “Limits”- Max 100 items per array
- Max 5 connections per API key