WebSocket: Price [Free]

Stream real-time token prices over a WebSocket connection.

WebSocket URL

wss://price.data-service.tokenmetrics.com

  • Pass your API key in the request headers, not in the URL.
  • This endpoint requires authentication via the x-api-key.

Subscribe to Token Prices

Send a JSON payload after establishing the WebSocket connection to begin receiving live prices.

๐Ÿ”น Request Body

{
  "is_append": 0,
  "tokens": ["bitcoin", "ethereum"]
}

Request Parameters

NameTypeRequiredDescription
is_appendnumberYesSet to 0 to replace current token list, or 1 to append to it
tokensarrayYesArray of token slugs (e.g., "bitcoin", "ethereum")

Response

After subscribing, you'll receive real-time price updates for each token.

๐Ÿ”น Example Response

{
    "timestamp": "2025-06-24 15:41:02",
    "event_timestamp": "2025-06-24 15:41:02",
    "arrival_timestamp": "2025-06-24 15:41:02",
    "epoch": 1750779662052,
    "token_address": null,
    "token_name": "Bitcoin",
    "token_symbol": "BTC",
    "token_id": 3375,
    "cg_id": "bitcoin",
    "instrument": "BTC",
    "exchange": "gate",
    "exchange_rank": 13,
    "exchange_type": "cex",
    "amount": null,
    "amount_in_usd": null,
    "price": 105376.15,
    "price_in_usd": 105376.15,
    "price_against_side_currency": 105376.15,
    "volume": 976826225.67417,
    "side_amount": null,
    "transaction_type": null,
    "isBid": false,
    "sequence": 0,
    "maker_address": null,
    "signature": null,
    "last_5s_messages": []
}

Update Subscriptions

To modify the list of tokens after connection:

{
  "is_append": 1,
  "tokens": ["solana"]
}

Use:

  • is_append: 1 to add tokens
  • is_append: 0 to replace the list

Authentication Errors

  • Connections with an invalid or missing x-api-key will be closed.
  • Only valid and authorized API keys can receive real-time data.

Supported Token Slugs

To get the full list of supported TOKEN_SLUG values that can be passed in the WebSocket request, refer to our Swagger documentation:

๐Ÿ”— GET /v2/tokens/info

This endpoint returns metadata for all available tokens, including their corresponding TOKEN_SLUG fields, which are required when subscribing via WebSocket.

Example values: "bitcoin", "ethereum", "solana".

WebSocket Limits by Plan

PlanConcurrent ConnectionsSubscriptions per ConnectionOutbound Messages/sec/conn
Basic (Free)115 symbols1
Advanced360 symbols3
Premium6120 symbols8
VIP12250 symbols12

A โ€œsubscriptionโ€ is one channel-plus-symbol pair. Clients can multiplex many subscriptions on a single socket to conserve connections.