Real-time data streaming via WebSocket connections for live quotes, order updates, and market events.
WebSocket URL: ws://localhost:8000/ws
Authentication: Send access token in initial connection message
JavaScript Example:
const ws = new WebSocket('ws://localhost:8000/ws');
// Authenticate on connection
ws.onopen = () => {
ws.send(JSON.stringify({
type: 'auth',
token: 'your-access-token'
}));
};
// Handle messages
ws.onmessage = (event) => {
const data = JSON.parse(event.data);
console.log('Received:', data);
};Real-time price updates for subscribed symbols. Updates every 1-5 seconds.
Individual trade executions as they happen. Includes price, volume, timestamp.
Alert triggers and notifications in real-time.
Paper trading order fills and position updates.