Skip to main content

Overview

DexPaprika’s Streaming API delivers real-time cryptocurrency price updates via Server-Sent Events (SSE). Build responsive applications with live data feeds. Get price updates every second without polling - no API key required.

No Authentication

Public endpoints with no API keys needed. Start streaming immediately.

Real-Time Updates

Receive price updates approximately every 1 second per asset.

SSE Protocol

Standard Server-Sent Events for easy integration with any modern platform.

Multi-Chain Support

Stream tokens from Ethereum, Solana, BSC, Arbitrum, and more networks.

Why Use Streaming?

Streaming vs Traditional Polling


Use Cases

What You Can Build

Portfolio Trackers

Show real-time portfolio values and P&L as prices fluctuate.

Price Alert Systems

Trigger instant notifications when prices hit target levels.

DEX Aggregators

Compare prices across chains for arbitrage opportunities.

Market Tickers

Create live price tickers and widgets for websites.

Analytics Platforms

Stream data into time-series databases for real-time analytics.

Available Endpoints

We offer two streaming methods optimized for different use cases:

Quick Comparison

FeatureGET (Single)POST (Multiple)
Assets per request1Up to 2,000
Best forIndividual price trackingPortfolios, dashboards
Setup complexityMinimalModerate
PerformanceGood for 1-10 assetsOptimal for 10+ assets
Load distributionPer connectionAutomatic balancing

Quick Start

1. Choose Your Method

Stream Ethereum WETH price:
curl -N "https://streaming.dexpaprika.com/stream?method=t_p&chain=ethereum&address=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"

2. Parse the Response

Each price update arrives as a JSON event:
{
  "a": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",  // Token address
  "c": "ethereum",                                     // Chain
  "p": "2739.792547827768",                           // Price in USD
  "t": 1769778188,                                    // Server send timestamp
  "t_p": 1769778187                                   // Price event timestamp
}

3. Handle in Your Application

const eventSource = new EventSource(url);

eventSource.addEventListener('t_p', (event) => {
  const price = JSON.parse(event.data);
  console.log(`${price.c} ${price.a}: $${price.p}`);
});

eventSource.onerror = () => {
  // Reconnect logic
  eventSource.close();
  setTimeout(connectStream, 1000);
};

Architecture Overview

Key Features

  • Automatic Load Balancing: Requests distributed across multiple servers
  • Persistent Connections: Single connection maintained for entire session
  • Efficient Updates: Only sends data when prices actually change
  • Global Infrastructure: Low-latency servers in multiple regions

Best Practices

  • Implement automatic reconnection with exponential backoff
  • Handle both network errors and SSE error events
  • Monitor connection health with heartbeat timeouts
  • Validate all assets before streaming (invalid assets cancel entire stream)
  • Parse both HTTP errors and SSE error events
  • Log errors for debugging but don’t expose sensitive data
  • Use POST method for multiple assets (better than multiple GETs)
  • Split large requests across multiple smaller streams
  • Parse price strings carefully to maintain precision
  • Implement proper logging and monitoring
  • Set up alerts for connection drops
  • Use connection pooling for multiple streams
  • Consider WebSocket bridges for incompatible clients

Supported Networks

Stream tokens from multiple blockchain networks. Use the Networks API to get the full list of supported networks:
curl https://api.dexpaprika.com/networks
Popular networks include:
  • Ethereum (ethereum)
  • Solana (solana)
  • Binance Smart Chain (bsc)
  • Arbitrum (arbitrum)
  • Polygon (polygon)
  • Base (base)
  • Avalanche (avalanche)
The chain parameter in streaming requests must use the exact id value from the Networks endpoint.

Finding Token Addresses

Before streaming prices, you need the correct token address for your chosen network. Use these REST API endpoints:

Search for Tokens

Use the Search API to find tokens by name or symbol:
curl "https://api.dexpaprika.com/search?query=USDC"

Get Token Details

Find all pools for a specific token using the Token Pools API:
curl "https://api.dexpaprika.com/networks/ethereum/tokens/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48/pools"

Validate Before Streaming

Use the Token Prices API to verify your token exists before streaming:
curl "https://api.dexpaprika.com/networks/ethereum/multi/prices?tokens=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
Always verify the token address matches the network you’re streaming from. The same token may have different addresses on different chains.
The streaming API will return a 400 Asset not found error if the token doesn’t exist on the specified network. Validate tokens using the REST API first to avoid stream failures.

Next Steps


Get Support