NEXO
Launch App
Back to Docs
Integration8 min read

WebSocket Streams

Real-time data streams via WebSocket connections

WebSocket Connection

Connect to NEXO WebSocket for real-time updates on transactions, prices, and network conditions.

Connection URL

bash
wss://ws.nexo.so/v1

Authentication

javascript
// Authenticate after connection
ws.send(JSON.stringify({
  type: 'auth',
  apiKey: 'YOUR_API_KEY'
}));

Available Streams

Transaction Updates

javascript
// Subscribe to transaction updates
ws.send(JSON.stringify({
  type: 'subscribe',
  channel: 'transactions',
  wallet: 'your_wallet_address'
}));

// Receive updates
{
  "type": "tx_update",
  "signature": "...",
  "status": "confirmed",
  "slot": 123456789
}

Price Feed

javascript
// Subscribe to price updates
ws.send(JSON.stringify({
  type: 'subscribe',
  channel: 'prices',
  tokens: ['SOL', 'USDC', 'BONK']
}));

MEV Alerts

javascript
// Subscribe to MEV activity alerts
ws.send(JSON.stringify({
  type: 'subscribe',
  channel: 'mev_alerts'
}));