API Documentation

Realtime

The fastest way to get new rates is to subscribe to our websockets. With our websockets you can establish a persistent connection through which new rates are pushed, so you do not have to poll for new data points.

Beta

The websockets are currently in beta. This means we might make some changes that could be considered breaking for your application, and we expect to have downtime every now and then while we are still in beta.

Authentication

The websocket protocol does not support regular HTTP headers, so it is not possible to use the x-access-token header when opening a new websocket. Authenticate to our websockets connections using a query parameter: 

wss://api.coinranking.com/v2/real-time/rates?x-access-token=your-api-key

You can generate a free API key. However, for our websockets you will need a pro subscription.

Subscribe to rates

pro This endpoint requires the pro plan or higher

Establish a websocket connection to get rates in real-time. There are two ways to subscribe to coins; directly establish a connection with subscriptions by using query parameters to select your subscriptions, or establish a connection and send a JSON message through the socket with the subscriptions you require.

GET /real-time/rates

Query parameters

NameTypeDescription
uuidsArray

With the UUIDs parameter, you can select which coins to subscribe to.

The UUIDs parameter is partly optional; you can choose to either subscribe to one or more coins, or you can subscribe to a list. Or both! But you have to at least select one list or one coin.

Provide a list of coin UUIDs to make your selection, use our other endpoints or our website to find the UUIDs of coins you want. There is a maximum of hundred coins you can subscribe to within one websocket.

Size range: 1-100
throttle (optional)String

With the throttle parameter, you prevent getting overloaded with rates. This is useful if performance is an issue, e.g. when using websockets in your frontend and want to prevent straining your client's their devices too much.

Throttling works per coin. If you select a throttle, this means rates for the same coin will not be pushed more than once within the specified duration. When you have subscribed to multiple coins, you still receive more messages within the specified duration.

You can choose between 1s (At least one second interval between a rate for each coin), 10s (fifteen seconds), or none (in which case you get every rate for all the coins that you subscribed to).

Default value: none
Allowed values:
none 1s 10s

Examples

Parameters examples

Response

{
  "currencyUuid": "Qwsogvtv82FCd",
  "price": "59585.64479860372914892766",
  "volume": "33769051110.0956537043822976375655904"
}

Response fields

NameTypeDescription
currencyUuidString

The currency of this rate

priceString

The latest price of this coin

volumeString

The latest volume of this coin