Skip to main content
The CoinPaprika Streaming API provides high-frequency cryptocurrency ticker data via WebSocket connections, allowing you to get live price updates, market cap changes, and volume data for your favorite cryptocurrencies.

Getting Started

1. Endpoint

Connect to our WebSocket endpoint to start receiving live cryptocurrency data:

2. Authentication

All requests require authentication using your API key. You must include it in the Authorization header of your WebSocket connection request. To get your API key, visit the CoinPaprika API page.
WebSocket streaming is part of the Enterprise plan. Keys issued on the Free, Starter, Pro, Business and Ultimate plans do not open a streaming connection. See API Plans for the full comparison, or contact us about Enterprise.

3. Finding IDs

  • Currency IDs (ids): To subscribe to a currency, you need its unique ID (e.g., "btc-bitcoin"). You can find these IDs by using the Coins endpoint from our REST API.
  • Quote Currencies (quotes): You can receive prices quoted in various currencies. The currently supported quote currencies are: USD, BTC, ETH, BNB, MATIC, SOL.

Subscribing to Tickers

Once connected, you can subscribe to or unsubscribe from ticker updates by sending JSON messages.

Subscribe

To receive updates for one or more cryptocurrencies, send a subscribe message:

Unsubscribe

To stop receiving updates, send an unsubscribe message:

Connection Management (Heartbeat)

The API uses the standard WebSocket ping/pong mechanism to keep connections alive. Your client does not need to send any application-level ping messages. The server sends a ping frame every 120 seconds. Most modern WebSocket client libraries will automatically respond with the required pong frame. If the server does not receive a pong response, it will assume the connection is stale and close it. The client examples below demonstrate a robust pattern for handling this by setting a timeout that will terminate and reconnect if a server ping is not received within a certain window.

Code Examples

Node.js

Prerequisites: Make sure to add "type": "module" to your package.json file to enable ES6 imports.

Python

Prerequisites: Install the required dependency:

Message Format

When subscribed, you’ll receive live updates in this format:
Where:
  • id: CoinPaprika currency ID
  • sym: Currency symbol
  • ts: Unix timestamp
  • quotes: Price data in requested quote currencies
    • m: Market cap
    • p: Current price
    • v24h: 24-hour volume

Rate Limits

  • Quotes per subscription: Up to 5 quote currencies at once.

Best Practices

  1. Implement heartbeat monitoring to ensure a stable connection.
  2. Handle reconnections gracefully, for example with an exponential backoff strategy.
  3. Subscribe only to needed currencies to optimize bandwidth.
  4. Store your API token securely and never expose it in client-side code.
  5. Implement proper error handling for network issues and connection closures.
  6. Add proper JSON parsing with try-catch blocks to handle malformed messages.

Support

For technical support or questions about the Streaming API:

FAQs

A WebSocket API streams real-time cryptocurrency market data over a persistent connection. Use it when you need low-latency price, volume, or market cap updates.
Yes. Pass your key in the Authorization header when establishing the WebSocket connection.
Ticks are pushed as markets change. There is no fixed interval; frequency depends on market activity.
Yes. Provide arrays for ids (e.g., btc-bitcoin) and quotes (e.g., USD, BTC) in the subscribe payload. To discover IDs quickly, use the Coverage Checker.
Each update includes quotes.{QUOTE}.p (price), quotes.{QUOTE}.v24h (24h volume), and quotes.{QUOTE}.m (market cap), plus a UNIX ts timestamp.