This service allows the consumers to fetch price updates.
The streaming WebSocket endpoint (/v1/stream
) requires authentication. The client may use either of the following methods to specify their access token:
Authorization
header of the request to Bearer <token>
.?ACCESS_TOKEN=<token>
to the request URL.Send a request to the server.
The schema of the Request
message provided below lists the available request types.
Available only on servers:
Accepts the following message:
{
"type": "subscribe",
"subscriptionId": 1,
"priceFeedIds": [
1,
2
],
"properties": [
"price"
],
"chains": [
"solana"
],
"deliveryFormat": "json",
"channel": "fixed_rate@200ms",
"jsonBinaryEncoding": "hex"
}
Receive a response from the server.
The schema of the Response
message provided below lists the available response types.
Available only on servers:
Accepts the following message:
{
"type": "subscribed",
"subscriptionId": 0
}
Subscribe to price updates
After a successful subscription, the server will respond with a Subscribed
message, followed by StreamUpdated
messages. If a subscription cannot be made, the server will respond with a SubscriptionError
message containing the error message.
Unsubscribe from price updates.
After a successful unsubscription, the server will respond with a Unsubscribed
message and stop sending StreamUpdated
messages for that subscription. If the unsubscription cannot be made, the server will respond with a SubscriptionError
message containing the error message.
Notification of a successful subscription.
Notification of a successful unsubscription.
Notification of a price update.
Notification of a failed subscription or unsubscription.
Notification of a general error.