Getting Started
To begin streaming real-time data, follow these steps:- Compare API Types: Ensure WebSockets are the right choice for your project. If you only need occasional updates, the REST API might be more efficient.
- Authentication: You will use the same credentials as the REST API. Review the Authentication guide to manage your API Keys.
Core Concepts
Connection Details
- Base URL:
wss://tradewatch.io/ - Format: JSON
- Protocol: Secure WebSocket (WSS)
Connection Lifecycle
Unlike standard HTTP requests, a WebSocket connection involves a handshake followed by a persistent stream:- Handshake: Establish a secure connection using your API Key.
- Subscription: Once connected, send a JSON “subscribe” message specifying the symbols you wish to track.
- Heartbeats: The server sends periodic pings to ensure the connection is alive. Ensure your client is configured to respond with pongs to prevent Limits or timeouts.
Real-Time Asset Classes
You can subscribe to real-time streams for any of the following categories. Click a link below to view the specific message schemas and available symbols for each:- Currencies: Ultra-low latency Forex feeds and major/minor pairs.
- Crypto: Real-time price action for global digital assets.
- Stocks: Live updates for international equity markets.
- Indices: Real-time tracking of global market benchmarks.
- Commodities: Live pricing for metals, energy, and agriculture.
