The TradeWatch WebSocket API provides a low-latency, bidirectional stream for real-time financial market data. While the REST API is ideal for historical data and snapshots, the WebSocket API is built for applications that require immediate updates, such as trading bots, real-time dashboards, and execution engines. With a single persistent connection, you can subscribe to thousands of tickers across all supported asset classes and receive tick-by-tick updates as they happen.Documentation Index
Fetch the complete documentation index at: https://tradewatch.io/docs/llms.txt
Use this file to discover all available pages before exploring further.
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://api.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.
