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
| Name | Type | Required | Description | 
|---|---|---|---|
| is_append | number | Yes | Set to 0 to replace current token list, or 1 to append to it | 
| tokens | array | Yes | Array 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:
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
| Plan | Concurrent Connections | Subscriptions per Connection | Outbound Messages/sec/conn | 
|---|---|---|---|
| Basic (Free) | 1 | 15 symbols | 1 | 
| Advanced | 3 | 60 symbols | 3 | 
| Premium | 6 | 120 symbols | 8 | 
| VIP | 12 | 250 symbols | 12 | 
A “subscription” is one channel-plus-symbol pair. Clients can multiplex many subscriptions on a single socket to conserve connections.