> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dexpaprika.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Real-time DEX streaming API: live token prices via SSE

> Stream live DEX token prices, pool reserves and swap transactions over Server-Sent Events (SSE). Prices stream with no API key on 35 showcase assets; a free key opens all three feeds on any token.

<Info>
  **Looking for the full API spec?** Jump to the [Streaming Reference](/streaming/stream-real-time-data-for-a-single-asset) tab for every endpoint, parameter, response schema, and a live API playground.
</Info>

<Card title="See the Streaming API in action" icon="desktop" href="https://dexpaprika.com/streaming/solana" color="#10B981">
  **Live Demo:** Watch our interactive dashboard stream real-time prices for 6 cryptocurrencies across Ethereum, Solana, and BSC. See connection status, latency metrics, and live updates in action. [Open Live Dashboard →](https://dexpaprika.com/streaming/solana)
</Card>

## Overview

DexPaprika's Streaming API delivers four real-time feeds via Server-Sent Events (SSE): live token prices, live pool reserve updates, live swap transactions and sealed token candles. Updates are pushed the moment a swap settles on-chain, with no polling.

Prices stream **without an API key** on the [35 showcase assets](/streaming/showcase-streams), one flagship token per chain, except Arc. Reserves and transactions need a key, and a [free one](https://console.dexpaprika.com) opens those three feeds on every token we index. Token candles are a paid-plan feed; see [OHLCV streaming](/streaming/ohlcv-streaming). Registration takes a minute and needs no card.

<Note>
  Every example on this page uses `streaming.dexpaprika.com`, the keyless and free-key host.
  Paid plans connect to `https://streaming-pro.dexpaprika.com` with the key in the
  `Authorization` header. Swap the base URL the same way you swap the REST one; see
  [upgrading to Pro](/api-pro/upgrading).
</Note>

<CardGroup cols={2}>
  <Card title="Prices, with no key" icon="unlock">
    Stream prices on the 35 showcase assets with no signup. A [free key](https://console.dexpaprika.com) opens reserves and transactions too, on any token, and raises the allowance to 100,000 credits.
  </Card>

  <Card title="Pushed on price moves" icon="bolt">
    A price event is pushed when a swap moves the price, so the rate tracks trading activity. Reserve events land for each block in which a subscribed pool's reserves changed.
  </Card>

  <Card title="SSE Protocol" icon="signal-stream">
    Standard Server-Sent Events for easy integration with any modern platform.
  </Card>

  <Card title="Multi-Chain Support" icon="link">
    Stream tokens and pools from Ethereum, Solana, BSC, Arbitrum, Base, and more networks.
  </Card>
</CardGroup>

### Four feeds, one transport

<CardGroup cols={2}>
  <Card title="Token Prices (/sse/prices)" icon="dollar-sign">
    USD price updates per token, pushed when a swap moves the price. Measured rates run from about 1 to about 52 updates a minute depending on the asset; see [plan your credit usage](/knowledge-base/credit-usage). Use this for tickers, portfolios, price-alert systems, and dashboards.
  </Card>

  <Card title="Pool Reserves (/sse/reserves)" icon="droplet" href="/streaming/reserves-streaming">
    Block-level pool reserve deltas, USD-denominated, for any DEX pool or any token. Use this for liquidity monitoring, TVL dashboards, slippage estimation, and MEV/arbitrage detection. **[Learn more →](/streaming/reserves-streaming)**
  </Card>

  <Card title="Transactions (/sse/transactions)" icon="arrow-right-arrow-left" href="/streaming/transactions-streaming">
    Individual swaps on one pool, or on every pool a token sits in, pushed as they settle. Use this for trade feeds, whale alerts and per-venue analytics. **[Learn more →](/streaming/transactions-streaming)**
  </Card>

  <Card title="Token OHLCV (/sse/ohlcv)" icon="chart-line" href="/streaming/ohlcv-streaming">
    Sealed token candles at 1s, 5s or 60s, resumable with `Last-Event-ID`. Paid plans only. Use this for charts and signal engines without building candles from swaps. **[Learn more →](/streaming/ohlcv-streaming)**
  </Card>
</CardGroup>

***

## Why use streaming?

### Streaming vs traditional polling

<Tabs>
  <Tab title="SSE Streaming (Recommended)">
    ```javascript theme={null}
    // Efficient: Server pushes updates only when prices change
    const url = 'https://streaming.dexpaprika.com/sse/prices?method=token_price&chain=ethereum&address=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2';
    const eventSource = new EventSource(url);

    eventSource.addEventListener('token_price', (event) => {
      const data = JSON.parse(event.data);
      updatePrice(data.price);
    });
    ```

    **Benefits:**

    * Single persistent connection
    * Updates pushed immediately when available
    * Minimal bandwidth usage
    * Nothing to poll, so no per-minute request limit to manage. Each update delivered still costs one credit, so budget for the update rate of what you subscribe to. See [rate limits](/knowledge-base/rate-limits) and [plan your credit usage](/knowledge-base/credit-usage) for measured rates and worked costs.
  </Tab>

  <Tab title="Polling (Not Recommended)">
    ```javascript theme={null}
    // Inefficient: Constant requests even when prices don't change
    setInterval(async () => {
      const response = await fetch('https://api.dexpaprika.com/networks/ethereum/tokens/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2');
      const data = await response.json();
      updatePrice(data.summary.price_usd);
    }, 1000); // 86,400 requests per day per asset!
    ```

    **Drawbacks:**

    * High server load from repeated requests
    * Wasted bandwidth when prices don't change
    * Potential rate limiting issues
    * Higher latency for updates
  </Tab>
</Tabs>

***

## Use cases

### What you can build

<CardGroup cols={2}>
  <Card title="Trading Dashboards" icon="chart-line" href="https://dexpaprika.com/streaming/solana">
    Display live prices, volume, and market metrics with sub-second latency. **[See live example →](https://dexpaprika.com/streaming/solana)**
  </Card>

  <Card title="Portfolio Trackers" icon="wallet">
    Show real-time portfolio values and P\&L as prices fluctuate.
  </Card>

  <Card title="Price Alert Systems" icon="bell">
    Trigger instant notifications when prices hit target levels.
  </Card>

  <Card title="DEX Aggregators" icon="arrows-rotate">
    Compare prices across chains for arbitrage opportunities.
  </Card>

  <Card title="Market Tickers" icon="display">
    Create live price tickers and widgets for websites.
  </Card>

  <Card title="Analytics Platforms" icon="chart-mixed">
    Stream data into time-series databases for real-time analytics.
  </Card>
</CardGroup>

***

## Available endpoints

Each feed has a single-asset GET form and a multi-asset POST form:

### Token price streams (`/sse/prices`)

<CardGroup cols={2}>
  <Card title="GET /sse/prices" icon="signal" href="/streaming/stream-real-time-data-for-a-single-asset">
    Stream one token's price per connection. Pass `method`, `chain`, and `address` as query params.
  </Card>

  <Card title="POST /sse/prices" icon="signal-stream" href="/streaming/subscribe-to-multiple-assets-streaming">
    Stream multiple tokens (up to 25 per connection) by posting a JSON array of `{chain, address, method}` entries.
  </Card>
</CardGroup>

### Pool reserve streams (`/sse/reserves`)

<CardGroup cols={2}>
  <Card title="GET /sse/reserves" icon="droplet" href="/streaming/stream-real-time-reserves-for-a-single-asset">
    Stream reserve updates for a single pool (`method=pool_reserves`) or a single token across every pool it sits in (`method=token_reserves`).
  </Card>

  <Card title="POST /sse/reserves" icon="layer-group" href="/streaming/subscribe-to-multiple-reserves-streaming">
    Subscribe to up to 25 pools or tokens in one connection. Mix `pool_reserves` and `token_reserves` entries freely.
  </Card>
</CardGroup>

### Quick comparison

| Feature                       | GET (Single)                   | POST (Multi)                                  |
| ----------------------------- | ------------------------------ | --------------------------------------------- |
| **Subscriptions per request** | 1                              | Up to 25                                      |
| **Best for**                  | Individual asset/pool tracking | Portfolios, dashboards, multi-pool monitoring |
| **Setup complexity**          | Minimal                        | Moderate                                      |
| **Load distribution**         | Per connection                 | Automatic balancing                           |

For workloads larger than 25 subscriptions, open multiple parallel POST streams.

***

## Quick start

### 1. Choose your method

<Tabs>
  <Tab title="Single Asset (Simple)">
    Stream Ethereum WETH price:

    ```bash theme={null}
    curl -N "https://streaming.dexpaprika.com/sse/prices?method=token_price&chain=ethereum&address=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
    ```
  </Tab>

  <Tab title="Multiple Assets (Advanced)">
    Stream SOL and WETH prices:

    ```bash theme={null}
    curl -X POST "https://streaming.dexpaprika.com/sse/prices" \
      -H "Accept: text/event-stream" \
      -H "Content-Type: application/json" \
      -d '[
        {"chain": "solana", "address": "So11111111111111111111111111111111111111112", "method": "token_price"},
        {"chain": "ethereum", "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", "method": "token_price"}
      ]'
    ```
  </Tab>
</Tabs>

### 2. Parse the response

Each price update arrives as a JSON event. The default method `token_price` returns full field names:

```json theme={null}
{
  "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
  "chain": "ethereum",
  "price": "2257.973351845954",
  "timestamp": 1778846475,
  "timestamp_price": 1778846474,
  "token_price": 1778846474
}
```

The legacy `t_p` method emits a compact shape with single-letter keys (`a`, `c`, `p`, `t`, `t_p`). It is **deprecated** and kept only for backward compatibility.

### 3. Handle in your application

<CodeGroup>
  ```javascript Browser theme={null}
  const eventSource = new EventSource(url);

  eventSource.addEventListener('token_price', (event) => {
    const price = JSON.parse(event.data);
    console.log(`${price.chain} ${price.address}: $${price.price}`);
  });

  // Optional: surface deprecation notices the server may push
  eventSource.addEventListener('warning', (event) => {
    const { message } = JSON.parse(event.data);
    console.warn('[stream warning]', message);
  });

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

  ```python Python theme={null}
  import requests
  import json

  response = requests.get(url, stream=True)

  # Buffer lines per SSE message (separated by blank lines), then dispatch.
  # Both `event:`/`data:` orderings are valid SSE and the server has emitted
  # either during rollout. A line-by-line parser that assumes one order will
  # silently mis-dispatch. Always group first.
  msg_lines = []
  for line in response.iter_lines(decode_unicode=True):
      if line:
          msg_lines.append(line)
          continue

      event_type = "message"
      data_str = None
      for ml in msg_lines:
          if ml.startswith("event:"):
              event_type = ml.split(":", 1)[1].strip()
          elif ml.startswith("data:"):
              data_str = ml[5:].lstrip()
      msg_lines = []

      if event_type == "token_price" and data_str is not None:
          data = json.loads(data_str)
          print(f"{data['chain']} {data['address']}: ${data['price']}")
  ```

  ```typescript TypeScript theme={null}
  interface PriceEvent {
    address: string;
    chain: string;
    price: string;
    timestamp: number;
    timestamp_price: number;
  }

  const stream = new EventSource(url);

  stream.addEventListener('token_price', (event: MessageEvent) => {
    const price: PriceEvent = JSON.parse(event.data);
    updatePrice(price);
  });
  ```
</CodeGroup>

***

## Architecture overview

```mermaid theme={null}
graph LR
    A[Your App] -->|SSE Connection| B[Streaming API]
    B --> C[Load Balancer]
    C --> D1[Server 1]
    C --> D2[Server 2]
    C --> D3[Server N]
    D1 --> E[Price Feeds]
    D2 --> E
    D3 --> E
    E --> F[Blockchain RPCs]
```

### 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

***

## Limits & quotas

Service limits enforced by the streaming gateway:

| Limit                             | Value                             | Notes                                                                                                                                                                                                                                                |
| --------------------------------- | --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Concurrent SSE streams per IP     | **10**                            | Exceeding returns `429 Too Many Requests` with body `{"message": "ip stream limit exceeded"}`                                                                                                                                                        |
| Subscriptions per POST connection | **25**                            | `POST /sse/prices` rejects with `{"message":"too many assets, max 25 allowed"}`. `POST /sse/reserves` rejects with `{"message":"too many subscriptions"}`                                                                                            |
| Ping interval                     | **15 seconds**                    | A `ping` event is pushed periodically to keep the connection open                                                                                                                                                                                    |
| Credit cost                       | **1 credit per update delivered** | Connections are free. Only delivered events are charged, against 30,000 credits per rolling 30 days keyless, 100,000 with a free key, or 5M on [Pro](https://dexpaprika.com/api/pricing). See [plan your credit usage](/knowledge-base/credit-usage) |

### Event types you may receive

| Event            | When                                                                                         | Payload                                                                                   |
| ---------------- | -------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| `token_price`    | New price observation for a subscribed token                                                 | `{address, chain, price, timestamp, timestamp_price}`                                     |
| `pool_reserves`  | Pool reserves changed on the latest indexed block                                            | `{chain, pool_id, block, previous_block, tokens[], total_reserve_usd, total_delta_usd}`   |
| `token_reserves` | A token's aggregate reserves changed (across all its pools)                                  | `{chain, token_id, reserve, delta, block, price_usd, reserve_usd, delta_usd, updated_at}` |
| `ping`           | Every \~15s while idle                                                                       | `{"time": <unix>}`                                                                        |
| `warning`        | Deprecation notices or other non-fatal signals                                               | `{"message": "..."}`                                                                      |
| `error`          | Stream-terminating error (e.g. invalid asset)                                                | `{"message": "..."}`                                                                      |
| `t_p`            | **Deprecated.** Legacy compact price shape (`{a, c, p, t, t_p}`). Use `token_price` instead. |                                                                                           |

<Tip>
  Parsers should skip events whose `event:` field is not in the allow-list they care about. The set may grow over time (e.g. new `warning` event was added in May 2026), so an unrecognised event must never crash your handler.
</Tip>

***

## Best practices

<AccordionGroup>
  <Accordion title="Connection Management">
    * Implement automatic reconnection with exponential backoff
    * Handle both network errors and SSE error events
    * Monitor connection health with heartbeat timeouts
  </Accordion>

  <Accordion title="Error Handling">
    * 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
  </Accordion>

  <Accordion title="Performance Optimization">
    * Use POST method for multiple assets (better than multiple GETs)
    * Split large requests across multiple smaller streams
    * Parse price strings carefully to maintain precision
  </Accordion>

  <Accordion title="Production Deployment">
    * Implement proper logging and monitoring
    * Set up alerts for connection drops
    * Use connection pooling for multiple streams
    * Consider WebSocket bridges for incompatible clients
  </Accordion>
</AccordionGroup>

***

## Supported networks

Stream tokens from multiple blockchain networks. Use the [Networks API](/api-reference/networks/get-a-list-of-available-blockchain-networks) to get the full list of supported networks:

```bash theme={null}
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`)

<Note>
  The `chain` parameter in streaming requests must use the exact `id` value from the [Networks endpoint](/api-reference/networks/get-a-list-of-available-blockchain-networks).
</Note>

***

## 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](/api-reference/search/search-for-tokens-pools-and-dexes) to find tokens by name or symbol:

```bash theme={null}
curl "https://api.dexpaprika.com/search?query=USDC"
```

### Find a token's pools

List pools for a specific token using [pool search](/tutorials/pool-filtering) with the `token_address` filter (per-network search only; the cross-network `/pools/search` ignores it):

```bash theme={null}
curl "https://api.dexpaprika.com/networks/ethereum/pools/search?token_address=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
```

### Validate before streaming

Use the [Token Prices API](/api-reference/tokens/get-batched-prices-for-multiple-tokens-on-a-network) to verify your token exists before streaming:

```bash theme={null}
curl "https://api.dexpaprika.com/networks/ethereum/multi/prices?tokens=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
```

<Tip>
  Always verify the token address matches the network you're streaming from. The same token may have different addresses on different chains.
</Tip>

<Warning>
  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.
</Warning>

***

## Next steps

<CardGroup cols={2}>
  <Card title="Reserves Streaming" icon="droplet" href="/streaming/reserves-streaming" color="#10B981">
    The deep dive on `/sse/reserves`: what gets pushed when reserves move, the two subscription methods, annotated wire example, use cases for LPs, MEV builders, and analytics teams.
  </Card>

  <Card title="Quick Start Tutorial" icon="rocket" href="/streaming/tutorials/quick-start">
    Build your first streaming application in 5 minutes. Covers both prices and reserves.
  </Card>

  <Card title="Live dashboard demo" icon="desktop" href="https://dexpaprika.com/streaming/solana">
    Interactive streaming demo. Pick a chain, pick tokens, watch the SSE events flow in real time.
  </Card>

  <Card title="React Integration" icon="react" href="/streaming/guides/react-integration">
    Build streaming components for React and Next.js applications.
  </Card>
</CardGroup>

***

## Get support

<CardGroup cols={2}>
  <Card title="Discord Community" icon="discord" href="https://discord.gg/DhJge5TUGM">
    Join our Discord for real-time support and discussions.
  </Card>

  <Card title="Email Support" icon="envelope" href="mailto:support@coinpaprika.com">
    Contact our team for technical assistance.
  </Card>
</CardGroup>
