Tickers

Tickers provide detailed trading pair data from specific markets, showing the exchange rate between two currencies (e.g., BTC/USD). They include granular market information like base/quote volumes, close price, and more.

The fastest way to get new tickers is to subscribe to our WebSockets. You can request tickers through our get market details endpoints too, but they will only update once a minute. With our WebSockets you can establish a persistent connection through which new tickers are pushed, so you get the latest ticker data whenever they are calculated.

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/tickers?x-access-token=your-api-key

Connection Setup

Professional This endpoint requires the professional plan or higher
Real-Time Dex DEX data requires the Real-time DEX data add-on.

Establish a WebSocket connection to get ticker data in real-time.

wss://api.coinranking.com/v2/real-time/tickers

You can subscribe to tickers in two ways:

  1. URL Query Parameters: Specify subscriptions directly in the connection URL
  2. Subscription Messages: Send JSON messages through the WebSocket after connecting to update your subscription

URL Query Parameters

You can specify your subscription preferences directly in the WebSocket connection URL using query parameters. This is the recommended approach when you know your subscription requirements at connection time.

Important: You must choose only ONE of the following subscription parameters: market-uuids, exchange-uuids, currency-uuids, or list. You cannot mix different parameter types.

Parameter Description
market-uuids[] Array

Subscribe to specific market pairs. Provide a list of market UUIDs to get ticker data for specific trading pairs.

This allows you to get ticker data for specific market pairs across exchanges. You can find market UUIDs in our markets endpoint

Note: Use array notation in the URL: market-uuids[]=dj23kKgETIie

Size range: 1-100

Example:
wss://api.coinranking.com/v2/real-time/tickers?market-uuids[]=dj23kKgETIie
exchange-uuids[] Array

Subscribe to all ticker data for specific exchanges. This will give you all ticker data available on the selected exchanges.

Provide a list of exchange UUIDs to make your selection. You can find exchange UUIDs in our exchanges endpoint

Note: Use array notation in the URL: exchange-uuids[]=-zdvbieRdZ&exchange-uuids[]=TjMe3QlK0

Size range: 1-100

Example:
wss://api.coinranking.com/v2/real-time/tickers?exchange-uuids[]=-zdvbieRdZ
currency-uuids[] Array

Subscribe to all ticker data for specific currencies across all exchanges. This will give you ticker data for the selected currencies from all available exchanges.

Provide a list of currency UUIDs to make your selection. You can find currency UUIDs in our reference currencies endpoint

Note: Use array notation in the URL: currency-uuids[]=Qwsogvtv82FCd

Size range: 1-100

Example:
wss://api.coinranking.com/v2/real-time/tickers?currency-uuids[]=Qwsogvtv82FCd
list (optional) String

CRITICAL: This parameter is ONLY available via URL query strings and cannot be used in subscription messages. When using list=all, you do not need to specify market-uuids[], exchange-uuids[], or currency-uuids[] as you will receive all ticker data automatically.

With the list parameter, you can subscribe to all ticker data. When set to all, you will receive ticker data for all market pairs from all exchanges.

The default is none, which means no list is selected and you must use other UUID parameters (market-uuids, exchange-uuids, or currency-uuids) to filter the list.

Default value: none
Allowed values: none all

Example:
wss://api.coinranking.com/v2/real-time/tickers?list=all
throttle (optional) String

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

Throttling works per exchange-currency pair. If you select a throttle, this means ticker data for the same pair will not be pushed more than once within the specified duration.

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

Example:
wss://api.coinranking.com/v2/real-time/tickers?throttle=10s

Subscription Messages

After establishing a WebSocket connection, you can update your subscription by sending JSON messages through the socket. This allows you to change which tickers you're subscribed to without reconnecting.

Important: The list parameter is NOT supported in subscription messages. It can only be used in URL query strings when initially connecting.

Send a JSON message with the following structure. Note that you must choose only ONE subscription type per message:

json
{ "marketUuids": ["dj23kKgETIie", "ia4qVnkhIxcQ"], "throttle": "10s" }

Or using exchange UUIDs:

json
{ "exchangeUuids": ["-zdvbieRdZ"], "throttle": "10s" }

Or using currency UUIDs:

json
{ "currencyUuids": ["Qwsogvtv82FCd"], "throttle": "10s" }

After sending a subscription message, the server will respond with a confirmation message (see Server Responses below).

Code examples

Responses

The WebSocket server sends different types of messages depending on the context:

Data Messages

When subscribed to tickers, you receive detailed trading pair data including price, volume, and market statistics. Each ticker message contains comprehensive information about a specific market pair: the market UUID, exchange UUID, base currency UUID, and quote currency UUID. This granular data allows you to track individual trading pairs across different exchanges, monitor base and quote volumes separately, and analyze market-specific price movements.

json
{ "marketUuid": "dj23kKgETIie", "exchangeUuid": "zdvbieRdZ", "baseUuid": "Qwsogvtv82FCd", "quoteUuid": "cpjRxjFYD", "exchangeType": "cex", "close": "124590.91", "price": "124590.91", "baseVolume": "24290.53392", "quoteVolume": "3036047751.1820064", "volume": "3036047751.1820064", "filters": [] }

Confirmation Messages

After sending a subscription update message through the WebSocket, the server responds with a confirmation message:

json
{ "type": "confirmation", "topic": "ticker", "throttle": "10s", "subscriptions": ["market:dj23kKgETIie","market:ia4qVnkhIxcQ"] }

This confirmation indicates that your subscription has been successfully updated.

Response fields

When subscribed to tickers, you receive new ticker data whenever it is available. Each ticker includes the UUID of the market, exchange, base currency, and quote currency, which is especially useful when you are subscribed to multiple markets or exchanges. Tickers include the latest price, close price, and volume data, both in base and quote currencies, as well as in US dollars.

Unlike our market details endpoints, we do not support other reference currencies than US dollars with WebSockets. You can, however, subscribe to multiple markets and exchanges, which allows you to calculate them yourself.

PropertyDescription
marketUuid String

The market UUID of this ticker. Useful if you subscribed to multiple markets, in which case the UUID helps you determine which market the ticker belongs to.

exchangeUuid String

The exchange UUID of this ticker. Useful if you subscribed to multiple exchanges, in which case the UUID helps you determine which exchange the ticker comes from.

baseUuid String

The base currency UUID of this ticker.

quoteUuid String

The quote currency UUID of this ticker.

exchangeType String

The type of exchange: cex for Centralized Exchanges or dex for Decentralized Exchanges.

close String

The last price received from the market. For example in an ETH/BTC market the close price would be the ETH’s value in BTC

price String

The latest price of the base currency in US Dollar.

baseVolume String

The 24 hour volume in the base currency.

quoteVolume String

The 24 hour volume in the quote currency.

volume String

The 24 hour volume in US Dollar.

filters String[]

An array of filters that are applied to the market. Most of the filters will cause the market to not be included in the price calculation of the coins.

Allowed values:
PREV_FACTOR EXTERNAL_ZSCORE GEO OUTSIDE_TOP_20