WebSocket Endpoint
Trade Events
Subscribe to Trades
Trade Filter Parameters
Token mint address to filter trades by.
Filter by specific trader wallet address.
Filter by trade type (
true = buys only, false = sells only).Filter by Pump Fun program ID.
Subscription Confirmation
Trade Event Response
Trade Response Fields
Token Creation Events
Subscribe to Token Creations
Creation Filter Parameters
Filter by token name.
Filter by token symbol.
Filter by token mint address.
Filter by user/creator wallet address.
Filter by creator wallet address.
Subscription Confirmation
Token Creation Response
Creation Response Fields
Unsubscribe
Request
Response
Code Examples
Trading Strategies
New Token Sniping
- Monitor
pumpFunCreateTokensSubscribefor newly created tokens and evaluate metadata quality. - Check if the creator has social links (Twitter, Telegram, website) as signals of legitimacy.
- Track initial buy volume immediately after creation to gauge early interest.
- Filter for tokens with
complete: falseto find tokens still on the bonding curve.
Volume Detection
- Track
totalVolumeSolper token to identify tokens gaining traction. - Monitor the buy/sell ratio to detect sustained buying pressure.
- Set thresholds for volume alerts (e.g., tokens exceeding 50 SOL in 5 minutes).
- Compare volume across multiple tokens to find relative outperformers.
Bonding Curve Analysis
- Monitor
vTokensInBondingCurveandvSolInBondingCurveto track curve progression. - Calculate the percentage of the curve completed to estimate proximity to graduation.
- Track the rate of curve progression to predict graduation timing.
- Watch for the
complete: trueflag andraydiumPoolvalue for graduation events.
Best Practices
Rate Limiting
- Use filter parameters to reduce the volume of incoming messages in production.
- Implement client-side throttling for analytics processing to avoid CPU spikes.
- Batch database writes rather than writing on every event.
- Consider subscribing to specific tokens rather than the full firehose when possible.
Data Management
- Store trade history efficiently with proper indexing on mint address and timestamp.
- Implement data retention policies to manage memory usage for long-running monitors.
- Use in-memory aggregations for real-time stats and persist summaries periodically.
- Clean up
tokenStatsfor tokens that have been inactive for extended periods.
Risk Management
- Never make trading decisions based solely on a single data point or metric.
- Validate token metadata and social links independently before acting on creation events.
- Be cautious of tokens with extremely rapid buy patterns, which may indicate coordinated activity.
- Monitor for rug pull signals: sudden large sells, creator wallet dumping, or authority changes.
