Quote subscriptions
A client on the trading WebSocket gets no prices until it subscribes to them. It can do so once it is logged in.
Subscribing
{
"messageType": "SubscribeQuotesRequest",
"symbols": ["EURUSD", "GBPUSD"],
"format": "protobuf"
}
| Field | Description |
|---|---|
symbols | The symbols to get prices for, 500 at most |
format | json or protobuf |
intervalMs | Optional. Send a price for a symbol at most once in this many milliseconds |
The answer carries the id of the subscription. Keep it to cancel the subscription later.
{
"messageType": "SubscribeQuotesResponse",
"subscriptionId": "123e4567-e89b-12d3-a456-426614174000"
}
With json, each price arrives as a Quote message with the fields symbol, bid, ask and timestamp. With protobuf, prices arrive as binary frames.
Cancelling
{
"messageType": "CancelQuotesRequest",
"subscriptionId": "123e4567-e89b-12d3-a456-426614174000"
}
subscriptionId is the id from the SubscribeQuotesResponse. There is no answer to this message.