Data
Overview
The Data
component provides interfaces to various cryptocurrency data sources. It handles real-time market data, historical data, and meta-information about tokens and trading pairs. The component is designed to be extensible and supports multiple data providers.
Data Resources
Dexscreener API: Provides token metrics (price, volume, liquidity, etc.).
Solana RPC API: Retrieves on-chain transaction data.
Pump.fun API & Web Scraper: Fetches trending tokens via WebSocket and scrapes metadata from the Pump.fun website.
Data Models
TokenData
: Stores token metadata (name, price, market cap, liquidity).TransactionData
: Records transaction counts and volume.PriceChangeData
: Tracks price fluctuations over defined time intervals.TrendingTokenData
: Stores trending token information retrieved from Pump.fun.MetaTokenData
: Stores categorized tokens based on metadata from Pump.fun.
Data Flow
API queries retrieve real-time data from Dexscreener and Solana RPC.
WebSocket connection streams trending tokens from Pump.fun.
Web scraping extracts categorized token metadata from Pump.fun.
Data is parsed and stored in structured models.
Models feed into the Agent’s analysis process.
Basic Concepts
Data Clients
PumpFunClient
Real-time token data
WebSocket streaming
Meta-market information
DexClient
Trading pair data
Token information
Market statistics
Data Types
Token Data
Price information
Volume metrics
Market indicators
Trading Pairs
Pair information
Liquidity data
Trading metrics
Architecture
Basic Usage
PumpFunClient
DexClient
Advanced Features
WebSocket Streaming
Batch Data Retrieval
Data Structures
Token Data
Error Handling
Network Errors
WebSocket Errors
Best Practices
Rate Limiting
Data Validation
Error Recovery
Performance Optimization
Connection Pooling
Caching
Extension Points
Data Transformers
Monitoring and Logging
Last updated