Overview
Access real-time market data through WebSocket streams. All WebSocket connections require authentication using API key headers during the connection handshake.Available Streams
Level 1 Quotes
Best bid/ask prices and quantities in real-time
Trade Executions
Real-time trade data with volume statistics
Order Book Depth
Complete order book with multiple price levels
Ticker Data
Real-time ticker data and price statistics
Stream Types Overview
Channel | Description | Update Frequency | Authentication |
---|---|---|---|
level1 | Best bid/ask quotes | Real-time | Required |
trade | Trade executions with volume stats | Per trade | Required |
depth | Full order book depth | Real-time | Required |
ticker | Comprehensive ticker data including funding rates, open interest, and mark prices | Real-time | Required |
Quick Subscribe
Multiple Streams Example
JavaScript Implementation
Supported Trading Pairs
Symbol | Description | Base Asset | Quote Asset |
---|---|---|---|
US500-BTC | S&P 500 Index to Bitcoin | US500 | BTC |
GOLD-BTC | Gold to Bitcoin | GOLD | BTC |
OIL-BTC | Oil to Bitcoin | OIL | BTC |
Message Format
All market data messages follow a consistent structure:Subscription Management
Subscribe to Streams
Unsubscribe from Streams
Best Practices
Subscription Strategy
Subscription Strategy
- Subscribe only to data you actually need
- Use batch subscriptions for multiple symbols
- Unsubscribe from unused streams to reduce bandwidth
- Validate symbol names before subscribing
Data Processing
Data Processing
- Handle snapshot vs delta updates appropriately
- Implement proper order book reconstruction for depth streams
- Buffer high-frequency updates for UI rendering
- Maintain local state for efficient processing
Performance Optimization
Performance Optimization
- Process messages asynchronously
- Use efficient data structures for order books
- Implement proper memory management
- Monitor bandwidth usage and adjust subscriptions
Error Handling
Common market data stream errors and solutions:Invalid Symbol
Invalid Symbol
Error: Subscription rejected due to invalid trading pairSolution: Verify symbol format matches supported trading pairs exactly
Rate Limiting
Rate Limiting
Error: Too many subscription requestsSolution: Batch multiple subscriptions into single request
Connection Issues
Connection Issues
Error: Message delivery interruptionSolution: Implement reconnection logic and state recovery
Next Steps
- Learn about Level 1 Quotes implementation details
- Explore Trade Executions for real-time trade data
- Review Order Book Depth for full market depth
- Set up Connection Management for reliable connectivity
- Explore Account Updates for private data streams