Quotes
Subscribe to real-time bid/ask price updates for one or more symbols over the WebSocket connection.
Subscribe
Section titled “Subscribe”Send a subscribe message with an array of symbol names:
{ "action": "subscribe", "channel": "quotes", "symbols": ["EURUSD", "GBPUSD", "BTCUSD"]}You can subscribe to up to 1000 symbols per connection.
Unsubscribe
Section titled “Unsubscribe”Send an unsubscribe message with the symbols you want to stop receiving:
{ "action": "unsubscribe", "channel": "quotes", "symbols": ["GBPUSD"]}Depth Option
Section titled “Depth Option”To include spread data in quote messages, subscribe with depth: true:
ws.send(JSON.stringify({ action: "subscribe", channel: "quotes", symbols: ["EURUSD"], depth: true }));Quote Messages
Section titled “Quote Messages”Once subscribed, you receive quote messages whenever the price updates:
{ "channel": "quote", "symbol": "EURUSD", "bid": 1.08550, "ask": 1.08553, "spread": 0.00003, "time": 1709500000}Quote Fields
Section titled “Quote Fields”| Field | Type | Description |
|---|---|---|
channel | string | Always quote |
symbol | string | Symbol name |
bid | number | Current bid price |
ask | number | Current ask price |
spread | number | Current spread (present when subscribed with depth: true) |
time | integer | Quote timestamp (Unix timestamp in seconds) |
- Quotes are pushed as they arrive from the market. Frequency depends on market activity.
- During low-activity periods (e.g., weekends), quotes may arrive infrequently or not at all.
- If you need order book depth data beyond bid/ask, see Market Depth.