Connection URLs
Production (SSL/WSS)
Connection Flow
1
Establish Connection
Connect to the secure WebSocket endpoint (no API key in URL).
2
Receive Welcome Message
Upon successful connection, you’ll receive a welcome message with available commands.
3
Authenticate Session
Send authentication message to verify your API key and get session details.
Connection Health
Ping/Pong Messages
Maintain connection health using ping/pong messages: Send Ping:Connection Monitoring
Monitor your connection status:- Send ping messages every 30 seconds
- Handle connection drops gracefully
- Implement exponential backoff for reconnections
- Monitor data usage in real-time
Error Handling
Connection Errors
Common connection issues and solutions:Invalid API Key
Invalid API Key
Error: Connection refused or immediate disconnectSolution: Verify your API key is valid and active
Rate Limit Exceeded
Rate Limit Exceeded
Error: Connection throttled or rejectedSolution: Implement proper rate limiting based on your tier
- Basic: 600 req/min
- Premium: 1,200 req/min
- Developer: 1,000 req/min
- Enterprise: 10,000 req/min
Data Limit Exceeded
Data Limit Exceeded
Error: Connection terminated due to data usageSolution: Monitor your 50GB monthly limit
Best Practices
Connection Management
- Use persistent connections
- Implement automatic reconnection
- Handle network interruptions gracefully
- Monitor connection latency
Resource Usage
- Monitor data consumption
- Unsubscribe from unused symbols
- Implement proper error handling
- Use ping/pong for health checks
