Overview
Stream real-time token USD prices via Server-Sent Events (SSE) with DexPaprika’s public streaming endpoint. Get price updates roughly every 1 second with no API key required. Base URL:https://streaming.dexpaprika.com
Endpoint: GET /stream
Protocol: HTTP/1.1 with text/event-stream (SSE)
Need to stream multiple assets? Use the POST method to stream multiple tokens simultaneously with better performance and load distribution.
Getting started
Basic example
Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
method | string | Yes | Streaming method. Must be t_p (token price) |
chain | string | Yes | Blockchain network ID from the Networks endpoint (e.g., ethereum, solana, bsc, arbitrum) |
address | string | Yes | Token contract address or canonical address on the chain |
limit | integer | No | Optional: close stream after emitting N events |
Request examples
Response format
Status:200 OK on success
Content-Type: text/event-stream
Format: Newline-delimited SSE events
Event payload
Response fields
| Field | Type | Description |
|---|---|---|
a | string | Token address |
c | string | Chain slug |
p | string | Price in USD (numeric string for precision) |
t | integer | Send timestamp (Unix seconds) |
Example response
Usage examples
Node.js quick listener
Browser (EventSource)
Error handling
HTTP status codes
| Status | Reason | Resolution |
|---|---|---|
400 Bad Request | Missing/invalid parameters | Check method, chain, address, limit |
400 Unsupported chain | Chain not supported | Use /networks endpoint to find valid chains |
400 Asset not found | Token address invalid for chain | Verify address belongs to the specified chain |
429 Too Many Requests | Global capacity exceeded | Retry with exponential backoff |
Common errors
Validation occurs in sequence. When testing
limit errors, use a known-valid token address (e.g., WETH on Ethereum) to avoid hitting asset not found before the limit validation.Integration tips
Supported Networks
Use the Networks endpoint to get valid chain IDs (e.g.,
bsc for Binance Smart Chain).Multiple Assets?
This endpoint streams one asset per connection. For multiple assets, use the POST method instead.
Handle Precision
Parse numeric strings as numbers to preserve price precision in your client.
Reconnection Logic
Implement standard SSE reconnection patterns to handle network interruptions gracefully.
Next steps
Stream Multiple Assets (POST)
Learn how to stream multiple assets simultaneously with better performance.
Quick API Reference
Explore REST endpoints for historical data and batch operations.
More Tutorials
Learn other ways to integrate DexPaprika into your applications.
Get support
Join Discord
Connect with our community and get real-time support.
Give Feedback
Share your experience and help us improve.
FAQs
Do I need an API key?
Do I need an API key?
No. The streaming endpoint is public; no API keys or registration required.
How many assets can I stream at once?
How many assets can I stream at once?
This endpoint streams one asset per connection. For multiple assets, use the POST method which can stream up to 10,000 assets in a single request.
What is the price update frequency?
What is the price update frequency?
Target emission is ~1 second per connection, subject to server load and network conditions.
How do I handle connection drops?
How do I handle connection drops?
Implement standard SSE reconnection logic with exponential backoff on network failures.
Are prices in USD only?
Are prices in USD only?
Yes, this endpoint provides prices in USD. Numeric values are provided as strings to preserve precision.