Lightspeed
Ultra-fast price data streaming without verification overhead
High-Performance Price Streaming
The fastest and most accurate market data with minimal overhead
Overview
Lightspeed is optimized for performance, delivering price updates every 500 milliseconds without the verification overhead of our other endpoints.
This endpoint is very similar to our StarkEx endpoint except it doesn’t contain any metadata that would allow you to verify data’s provenance. The trade-off provides significantly improved performance by eliminating signature generation overhead.
Ultra-Low Latency
Updates every 500ms with minimal processing overhead
High Accuracy
Aggregated from multiple premium sources
Simplified Format
Streamlined JSON responses for easier integration
Connection
Open WebSocket Connection
Connect to our WebSocket endpoint on your preferred environment:
Subscribe to Asset Pairs
By default, no asset pairs are subscribed. Send a subscription message to start receiving data.
Receive Real-Time Updates
Once subscribed, you’ll receive price updates every 500 milliseconds for your selected pairs.
Subscription Management
Subscribing to Pairs
The response includes all pairs you are currently subscribed to, including any previous subscriptions not mentioned in your latest request.
Unsubscribing from Pairs
If you close your WebSocket connection, all your subscriptions will be automatically cleared. You’ll need to resubscribe when reconnecting.
Data Format
Field Reference
All numeric values are returned as strings to preserve precision, especially for assets with very small or very large prices.
Implementation Examples
Best Practices
Implement Reconnection Logic
WebSocket connections can drop for various reasons. Always implement automatic reconnection with backoff strategy.
Process Updates Asynchronously
Handle price updates asynchronously to avoid blocking the WebSocket receive thread, especially in high-frequency scenarios.
Batch Subscription Changes
When subscribing to multiple pairs, send them in a single message rather than separate requests.
Monitor Connection Health
Implement periodic health checks and heartbeat monitoring to ensure your connection stays active.
Comparison with Starkex
Lightspeed
- ✓ Minimal payload size
- ✓ Optimized for performance
- ✓ Lower latency
- ✓ Ideal for trading applications
- ❌ No verification metadata
Starkex
- ✓ Includes cryptographic signatures
- ✓ Verifiable price data
- ✓ Individual publisher prices
- ✓ Ideal for StarkEx integration
- ⚠️ Slightly larger payload size
Choose Lightspeed when performance is your primary concern and Starkex when data provenance verification is required.
Was this page helpful?