High-frequency cryptocurrency data via WebSocket
Authorization
header of your WebSocket connection request.
To get your API key, visit the CoinPaprika API page.
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.quotes
): You can receive prices quoted in various currencies. The currently supported quote currencies are: USD
, BTC
, ETH
, BNB
, MATIC
, SOL
.subscribe
message:
unsubscribe
message:
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.
"type": "module"
to your package.json
file to enable ES6 imports.
id
: CoinPaprika currency IDsym
: Currency symbolts
: Unix timestampquotes
: Price data in requested quote currencies
m
: Market capp
: Current pricev24h
: 24-hour volume