API Integration
Overview
PumpPortal Integration
WebSocket Connection
const CONTRACT_ADDRESS = '...';
// Connect to PumpPortal
const ws = new WebSocket('wss://pumpportal.fun/api/data');
ws.onopen = () => {
console.log('Connected to PumpPortal');
// Subscribe to token
ws.send(JSON.stringify({
method: 'subscribe',
keys: [CONTRACT_ADDRESS]
}));
};
ws.onmessage = (event) => {
const trade = JSON.parse(event.data);
console.log('Trade detected:', {
type: trade.txType,
amount: trade.tokenAmount,
sol: trade.solAmount,
wallet: trade.signature.substring(0, 8)
});
};
ws.onerror = (error) => {
console.error('WebSocket error:', error);
};Trade Data Structure
X804 API Endpoints
Get Recent Rewards
Get Statistics
Get Wallet Rewards
Code Examples
React Integration
Node.js Backend
Python Integration
Rate Limits
Best Practices
Support
Last updated

