Appearance
Pump Fun
Real-time monitoring of Pump Fun platform activities including trades and token creations on Solana.
Overview
The Pump Fun WebSocket streams provide comprehensive real-time data for:
- Buy and sell transactions as they occur on-chain
- New token launches and creations on the platform
- Trader activity and token metrics
Connection
WebSocket Endpoint:
wss://api.nolimitnodes.com/socket?apikey=YOUR_API_KEY
1
Trade Events Stream
Monitor real-time buy and sell transactions for tokens on Pump Fun.
Subscribe to Trades
json
{
"method": "dataSubscribe",
"params": {
"referenceId": "PUMP_TRADES",
"streams": [
{
"stream": "pumpFunTradesSubscribe",
"params": {
"token": "2M4QNeba4PAorsCmi6gkg3Gn7NvBqnL9A6BTj9zApump",
"wallet": "GPSwijrmxy7ChMHB1P8YSp5sa5Rsj4bYnrTZYF4Ydbow",
"isBuy": true
}
}
]
},
"id": 1
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Trade Filter Parameters
Parameter | Type | Required | Description |
---|---|---|---|
token | string | No | Token mint address to filter |
wallet | string | No | Filter by specific trader wallet |
isBuy | boolean | No | Filter by trade type (true for buys only, false for sells only) |
programId | string | No | Filter by PumpFun program ID |
Trade Event Response
json
{
"method": "pumpFunTradesSubscribe",
"subscription_id": "your_subscription_id",
"result": {
"signature": "2xBSNuTJkk5YYSK...",
"mint": "2M4QNeba4PAorsCmi6gkg3Gn7NvBqnL9A6BTj9zApump",
"traderPublicKey": "GPSwijrmxy7ChMHB1P8YSp5sa5Rsj4bYnrTZYF4Ydbow",
"txType": "buy",
"tokenAmount": 1000000,
"marketCapSol": 250.5,
"vTokensInBondingCurve": 800000000,
"vSolInBondingCurve": 120.3,
"solAmount": 0.5,
"blockUnixTime": 1735683247,
"slot": 123456789
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Trade Field Descriptions
signature
: Transaction signaturemint
: Token mint addresstraderPublicKey
: Wallet address of the tradertxType
: Transaction type ("buy" or "sell")tokenAmount
: Amount of tokens tradedsolAmount
: Amount of SOL involved in the trademarketCapSol
: Current market cap in SOLvTokensInBondingCurve
: Virtual tokens in bonding curvevSolInBondingCurve
: Virtual SOL in bonding curveblockUnixTime
: Unix timestamp of the blockslot
: Solana slot number
Token Creation Stream
Get instant notifications when new tokens are created on Pump Fun.
Subscribe to Token Creations
json
{
"method": "dataSubscribe",
"params": {
"referenceId": "PUMPFUN_CREATE_TOKENS",
"streams": [
{
"stream": "pumpFunCreateTokensSubscribe",
"params": {
"event_type": "create_coin",
"creator": "optional_creator_address"
}
}
]
},
"id": 1
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Creation Filter Parameters
Parameter | Type | Required | Description |
---|---|---|---|
name | string | No | Filter by token name |
symbol | string | No | Filter by token symbol |
mint | string | No | Filter by token mint address |
user | string | No | Filter by user/creator wallet address |
creator | string | No | Filter by creator wallet address |
Token Creation Response
json
{
"method": "pumpFunCreateTokensSubscribe",
"subscription_id": "your_subscription_id",
"result": {
"signature": "3xvKdnJkX8ZYSK...",
"mint": "HcLKQJvJnfbGo4vhxBnL3bK9cGJGX7FBwdZapump",
"name": "My Token",
"symbol": "MTK",
"uri": "https://ipfs.io/ipfs/...",
"creator": "DYw9vHXgH7cJhQPfNfhGqBwHGcKG8H4bXgqPfVdVow",
"description": "A new token on Pump Fun",
"imageUri": "https://ipfs.io/ipfs/...",
"metadataUri": "https://ipfs.io/ipfs/...",
"twitter": "@mytoken",
"telegram": "@mytokengroup",
"website": "https://mytoken.com",
"showName": true,
"createdTimestamp": 1735683247,
"raydiumPool": null,
"complete": false,
"totalSupply": 1000000000,
"blockUnixTime": 1735683247,
"slot": 123456789
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Creation Field Descriptions
signature
: Transaction signaturemint
: New token mint addressname
: Token namesymbol
: Token symboluri
: Token metadata URIcreator
: Creator wallet addressdescription
: Token descriptionimageUri
: Token image URImetadataUri
: Full metadata URItwitter
: Twitter handle (if provided)telegram
: Telegram group (if provided)website
: Project website (if provided)showName
: Whether to show name in UIcreatedTimestamp
: Creation timestampraydiumPool
: Raydium pool address (when graduated)complete
: Whether bonding curve is completetotalSupply
: Total token supplyblockUnixTime
: Unix timestamp of the blockslot
: Solana slot number
Unsubscribe
To stop receiving events, use the dataUnsubscribe
method:
json
{
"method": "dataUnsubscribe",
"params": {
"subscriptionIds": ["your_subscription_id_here"],
"referenceId": "UNSUB_REF"
}
}
1
2
3
4
5
6
7
2
3
4
5
6
7
Code Examples
JavaScript/Node.js - Complete Pump Fun Monitor
javascript
const WebSocket = require('ws');
class PumpFunMonitor {
constructor(apiKey) {
this.ws = new WebSocket(`wss://api.nolimitnodes.com/socket?apikey=${apiKey}`);
this.tokenStats = new Map();
this.setupHandlers();
}
setupHandlers() {
this.ws.on('open', () => {
console.log('Connected to Pump Fun streams');
this.subscribeToAll();
});
this.ws.on('message', (data) => {
const message = JSON.parse(data);
if (message.method === 'pumpFunTradesSubscribe') {
this.processTrade(message.result);
} else if (message.method === 'pumpFunCreateTokensSubscribe') {
this.processTokenCreation(message.result);
}
});
this.ws.on('error', (error) => {
console.error('WebSocket error:', error);
});
this.ws.on('close', () => {
console.log('Connection closed. Reconnecting...');
setTimeout(() => this.reconnect(), 5000);
});
}
subscribeToAll() {
// Subscribe to trades
this.ws.send(JSON.stringify({
method: 'dataSubscribe',
params: {
referenceId: 'PUMP_TRADES',
streams: [{
stream: 'pumpFunTradesSubscribe',
params: {}
}]
},
id: 1
}));
// Subscribe to token creations
this.ws.send(JSON.stringify({
method: 'dataSubscribe',
params: {
referenceId: 'PUMP_CREATIONS',
streams: [{
stream: 'pumpFunCreateTokensSubscribe',
params: {}
}]
},
id: 2
}));
}
processTrade(trade) {
// Update token statistics
if (!this.tokenStats.has(trade.mint)) {
this.tokenStats.set(trade.mint, {
buys: 0,
sells: 0,
volume: 0,
lastPrice: 0,
marketCap: 0
});
}
const stats = this.tokenStats.get(trade.mint);
if (trade.txType === 'buy') {
stats.buys++;
console.log(`🟢 BUY: ${trade.tokenAmount} tokens for ${trade.solAmount} SOL`);
} else {
stats.sells++;
console.log(`🔴 SELL: ${trade.tokenAmount} tokens for ${trade.solAmount} SOL`);
}
stats.volume += trade.solAmount;
stats.marketCap = trade.marketCapSol;
console.log(` Token: ${trade.mint.slice(0, 8)}...`);
console.log(` Trader: ${trade.traderPublicKey.slice(0, 8)}...`);
console.log(` Market Cap: ${trade.marketCapSol} SOL`);
console.log(` Bonding Curve: ${trade.vSolInBondingCurve} SOL / ${trade.vTokensInBondingCurve} tokens`);
console.log(` Stats: ${stats.buys} buys, ${stats.sells} sells, ${stats.volume.toFixed(2)} SOL volume\n`);
}
processTokenCreation(token) {
console.log(`\n🚀 NEW TOKEN CREATED!`);
console.log(` Name: ${token.name} (${token.symbol})`);
console.log(` Mint: ${token.mint}`);
console.log(` Creator: ${token.creator.slice(0, 8)}...`);
console.log(` Description: ${token.description || 'N/A'}`);
console.log(` Total Supply: ${(token.totalSupply / 1e9).toLocaleString()}`);
if (token.twitter || token.telegram || token.website) {
console.log(` Socials:`);
if (token.twitter) console.log(` Twitter: ${token.twitter}`);
if (token.telegram) console.log(` Telegram: ${token.telegram}`);
if (token.website) console.log(` Website: ${token.website}`);
}
console.log(` Metadata: ${token.metadataUri}\n`);
// Initialize token stats
this.tokenStats.set(token.mint, {
buys: 0,
sells: 0,
volume: 0,
lastPrice: 0,
marketCap: 0,
createdAt: new Date(token.createdTimestamp * 1000),
name: token.name,
symbol: token.symbol
});
}
reconnect() {
this.ws = new WebSocket(`wss://api.nolimitnodes.com/socket?apikey=${this.apiKey}`);
this.setupHandlers();
}
getTopTokens(limit = 10) {
const sorted = Array.from(this.tokenStats.entries())
.sort((a, b) => b[1].volume - a[1].volume)
.slice(0, limit);
console.log('\n📊 TOP TOKENS BY VOLUME:');
sorted.forEach(([mint, stats], index) => {
console.log(`${index + 1}. ${stats.name || 'Unknown'} (${stats.symbol || '???'})`);
console.log(` Volume: ${stats.volume.toFixed(2)} SOL`);
console.log(` Trades: ${stats.buys + stats.sells} (${stats.buys} buys, ${stats.sells} sells)`);
console.log(` Market Cap: ${stats.marketCap} SOL`);
});
}
}
// Usage
const monitor = new PumpFunMonitor('YOUR_API_KEY');
// Display top tokens every 30 seconds
setInterval(() => {
monitor.getTopTokens(5);
}, 30000);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
Python - Pump Fun Analytics
python
import json
import asyncio
import websockets
from datetime import datetime
from collections import defaultdict
class PumpFunAnalytics:
def __init__(self, api_key):
self.api_key = api_key
self.uri = f"wss://api.nolimitnodes.com/socket?apikey={api_key}"
self.token_data = defaultdict(lambda: {
'trades': [], 'buys': 0, 'sells': 0, 'volume_sol': 0,
'created_at': None, 'name': None, 'symbol': None
})
async def connect(self):
self.websocket = await websockets.connect(self.uri)
print("Connected to Pump Fun streams")
async def subscribe_all(self):
# Subscribe to trades
trades_sub = {
"method": "dataSubscribe",
"params": {
"referenceId": "PUMP_TRADES",
"streams": [{
"stream": "pumpFunTradesSubscribe",
"params": {}
}]
}
}
await self.websocket.send(json.dumps(trades_sub))
# Subscribe to token creations
creations_sub = {
"method": "dataSubscribe",
"params": {
"referenceId": "PUMP_CREATIONS",
"streams": [{
"stream": "pumpFunCreateTokensSubscribe",
"params": {}
}]
}
}
await self.websocket.send(json.dumps(creations_sub))
async def listen(self):
async for message in self.websocket:
data = json.loads(message)
if data.get('method') == 'pumpFunTradesSubscribe':
await self.process_trade(data['result'])
elif data.get('method') == 'pumpFunCreateTokensSubscribe':
await self.process_creation(data['result'])
async def process_trade(self, trade):
mint = trade['mint']
token = self.token_data[mint]
# Record trade
token['trades'].append({
'timestamp': datetime.fromtimestamp(trade['blockUnixTime']),
'type': trade['txType'],
'amount': trade['tokenAmount'],
'sol': trade['solAmount'],
'trader': trade['traderPublicKey']
})
# Update statistics
if trade['txType'] == 'buy':
token['buys'] += 1
print(f"🟢 BUY: {trade['solAmount']} SOL")
else:
token['sells'] += 1
print(f"🔴 SELL: {trade['solAmount']} SOL")
token['volume_sol'] += trade['solAmount']
token['market_cap'] = trade['marketCapSol']
# Detect patterns
await self.detect_trading_patterns(mint, trade)
async def process_creation(self, creation):
mint = creation['mint']
token = self.token_data[mint]
token['created_at'] = datetime.fromtimestamp(creation['createdTimestamp'])
token['name'] = creation['name']
token['symbol'] = creation['symbol']
token['creator'] = creation['creator']
token['total_supply'] = creation['totalSupply']
print(f"\n🚀 NEW TOKEN: {creation['name']} ({creation['symbol']})")
print(f" Mint: {mint[:8]}...")
print(f" Creator: {creation['creator'][:8]}...")
if creation.get('description'):
print(f" Description: {creation['description'][:100]}...")
async def detect_trading_patterns(self, mint, trade):
token = self.token_data[mint]
recent_trades = token['trades'][-20:] # Last 20 trades
if len(recent_trades) >= 5:
# Check for rapid buying (potential pump)
recent_buys = sum(1 for t in recent_trades[-5:] if t['type'] == 'buy')
if recent_buys >= 4:
print(f" ⚠️ RAPID BUYING DETECTED on {token['symbol'] or mint[:8]}")
# Check for large trades
avg_vol = sum(t['sol'] for t in recent_trades) / len(recent_trades)
if trade['solAmount'] > avg_vol * 3:
print(f" 🐋 WHALE ALERT: {trade['solAmount']} SOL ({trade['txType']})")
# Check buy/sell ratio
if len(recent_trades) >= 10:
buy_ratio = sum(1 for t in recent_trades if t['type'] == 'buy') / len(recent_trades)
if buy_ratio > 0.8:
print(f" 📈 BULLISH: {buy_ratio*100:.0f}% buy ratio")
elif buy_ratio < 0.2:
print(f" 📉 BEARISH: {(1-buy_ratio)*100:.0f}% sell ratio")
async def show_statistics(self):
"""Display token statistics periodically"""
while True:
await asyncio.sleep(60) # Every minute
print("\n" + "="*50)
print("📊 PUMP FUN STATISTICS")
print("="*50)
# Sort by volume
sorted_tokens = sorted(
self.token_data.items(),
key=lambda x: x[1]['volume_sol'],
reverse=True
)[:10]
for mint, data in sorted_tokens:
if data['volume_sol'] > 0:
name = data['name'] or 'Unknown'
symbol = data['symbol'] or '???'
print(f"\n{name} ({symbol})")
print(f" Volume: {data['volume_sol']:.2f} SOL")
print(f" Trades: {data['buys']} buys, {data['sells']} sells")
print(f" Market Cap: {data.get('market_cap', 0):.2f} SOL")
if data['trades']:
last_trade = data['trades'][-1]
print(f" Last: {last_trade['type']} {last_trade['sol']:.4f} SOL")
async def main():
analytics = PumpFunAnalytics("YOUR_API_KEY")
await analytics.connect()
await analytics.subscribe_all()
# Run analytics and periodic statistics concurrently
await asyncio.gather(
analytics.listen(),
analytics.show_statistics()
)
if __name__ == "__main__":
asyncio.run(main())
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
Trading Strategies
1. New Token Sniping
Monitor token creation events and analyze:
- Creator wallet history
- Initial liquidity
- Social media presence
- Metadata quality
2. Volume Detection
Track sudden volume increases that might indicate:
- Influencer promotion
- Community raids
- Bot activity
- Whale accumulation
3. Bonding Curve Analysis
Monitor bonding curve progression:
- Track progress to Raydium migration (complete = true)
- Identify tokens nearing completion
- Calculate optimal entry/exit points
Best Practices
1. Rate Limiting
- Implement reconnection logic with exponential backoff
- Cache frequently accessed data locally
- Batch operations when possible
2. Data Management
- Store historical data for pattern analysis
- Implement data retention policies
- Use efficient data structures for real-time processing
3. Risk Management
- Never trade solely based on WebSocket events
- Implement proper error handling
- Validate all data before processing