Price API Control Panel

Disconnected
0
Pools Detected
0
Messages
-
Latency
Message Log
New Pools
Integration Code

No pools detected yet. Click "Start Watching" to begin.

JavaScript Example

const ws = new WebSocket('ws://YOUR_SERVER:3000/ws'); ws.onopen = () => { console.log('Connected!'); // Watch for new PumpSwap pools ws.send(JSON.stringify({ action: 'watch_new_pools' })); }; ws.onmessage = (event) => { const data = JSON.parse(event.data); if (data.event === 'new_pool_pumpswap') { console.log('🚀 New Pool!', data.pool_id); console.log(' Price:', data.initial_price); console.log(' Base Vault:', data.base_vault); console.log(' Quote Vault:', data.quote_vault); // Now subscribe to price updates ws.send(JSON.stringify({ action: 'subscribe', pool: data.pool_id })); } if (data.pool && data.price) { console.log('💰 Price Update:', data.pool, data.price); } };

Python Example

import asyncio import websockets import json async def watch_pools(): uri = "ws://YOUR_SERVER:3000/ws" async with websockets.connect(uri) as ws: # Start watching new pools await ws.send(json.dumps({"action": "watch_new_pools"})) async for message in ws: data = json.loads(message) if data.get("event") == "new_pool_pumpswap": print(f"🚀 New Pool: {data['pool_id']}") print(f" Price: {data['initial_price']}") print(f" Base Vault: {data['base_vault']}") print(f" Quote Vault: {data['quote_vault']}") # Subscribe to this pool's price updates await ws.send(json.dumps({ "action": "subscribe", "pool": data["pool_id"] })) elif "price" in data: print(f"💰 Price: {data['pool']} = {data['price']}") asyncio.run(watch_pools())

Response Format: new_pool_pumpswap

{ "event": "new_pool_pumpswap", "pool_id": "PoolPubkey...", "base_mint": "TokenMint...", "quote_mint": "So111...112", // WSOL "base_vault": "VaultPubkey...", // For price tracking "quote_vault": "VaultPubkey...", // For price tracking "lp_mint": "LPMint...", "base_decimals": 6, "quote_decimals": 9, "base_amount_in": 1000000000, "quote_amount_in": 5000000000, "initial_liquidity": 100000000, "creator": "CreatorPubkey...", "coin_creator": "CoinCreator...", "is_mayhem_mode": false, "initial_price": 0.000001234, "price_multiplier": 0.001, "slot": 123456789, "signature": "TxSignature...", "timestamp": 1707046800000 }