跳转到主要内容
Learn how to stream and parse Pump.fun account data using Yellowstone gRPC. This guide demonstrates efficient account monitoring for trading bots, analytics platforms, and real-time DeFi applications.

Overview

For any Solana dApp, trading bot, or real-time analytics platform, efficient account data access is crucial. Yellowstone gRPC streaming offers a high-performance, low-latency alternative to traditional RPC polling and WebSockets.
What you’ll learn:
  • Stream all Pump.fun account updates in real-time
  • Decode account data using the program’s IDL
  • Track bonding curve and global account changes
  • Build production-ready account monitoring systems

Installation

Complete Working Example

Here’s a production-ready Pump.fun account monitor with bonding curve tracking:

Pump.fun Account Types

Bonding Curve Account

The bonding curve account contains the token economics and liquidity information:
Use cases:
  • Calculate current token price
  • Monitor liquidity changes
  • Detect when bonding curve completes
  • Track token supply distribution

Global Account

The global account contains program-wide configuration:

Advanced Examples

Example 2: Track Specific Bonding Curves

Monitor only specific bonding curve addresses:

Example 3: Filter for Active Bonding Curves

Filter for incomplete bonding curves only:

Example 4: Price Tracking

Track price movements across all bonding curves:

Example 5: Liquidity Monitoring

Track liquidity changes:

Dynamic Subscription Management

Modify your subscription on-the-fly without restarting:

Performance Tips

Use PROCESSED Commitment

Get updates faster with CommitmentLevel.PROCESSED for time-sensitive applications

Filter Efficiently

Use dataSize and memcmp filters to reduce bandwidth and processing load

Batch Processing

Process account updates in batches for better throughput

Cache Account State

Maintain local cache of account states to detect changes efficiently

Common Use Cases

IDL File

Download the Pump.fun IDL and save it as idl/pump_0.1.0.json:

Resources

Best Practices

Optimize your implementation

Transaction Parsing

Detect buy/sell events

Account Monitoring

General account monitoring guide