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

# Stream real-time data for multiple assets (Legacy)

> **Deprecated:** Superseded by `/sse/prices`.




## OpenAPI

````yaml /streaming/api-streaming.yml post /stream
openapi: 3.1.0
info:
  title: DexPaprika Streaming API
  version: 1.0.1
  license:
    name: UNLICENSED
    identifier: UNLICENSED
  description: >
    The DexPaprika Streaming API delivers real-time updates for token prices
    utilizing the Server-Sent Events (SSE) protocol.

    ### Connection Quotas and Limits To ensure high availability and
    infrastructure stability, the following constraints are strictly enforced:

    - **Concurrent Streams:** A maximum of **10 active SSE streams** are
    permitted per IP address. Exceeding this threshold results in a `429 Too
    Many Requests` response containing the message `ip stream limit exceeded`.

    - **Subscription Capacity:** Batch subscription endpoints (POST) are limited
    to a maximum of **25 requests per stream**.

    - **Keep-Alive Protocol:** The server dispatches a `ping` event every 15
    seconds to maintain active TCP connections.

    ### Deprecation Notice The `/stream` endpoint architecture has been
    refactored. 

    - Legacy path `/stream` is **deprecated** and scheduled for
    decommissioning. 

    - Active implementations must migrate to `/sse/prices`.

    ### Server-Sent Events (SSE) Protocol Messages conform to the standard W3C
    SSE specification with an additional `request_id` field for tracking
    multiplexed requests: ``` event: [event_name] request_id: [your_request_id]
    data: [json_payload] ```

    #### Request correlation (`request_id`) Every streaming endpoint accepts an
    optional `request_id` query parameter. When supplied, the server echoes it
    back on every message of the stream as an SSE `request_id:` field, so you
    can correlate emitted events with the subscription that produced them. This
    is most useful on multiplexed POST streams where several subscriptions share
    one connection. The `request_id` is included on all non-legacy, non-system
    events — it is omitted from `ping`, `warning`, and `error` events.

    - **Format:** the value must be a non-negative integer. Any non-numeric
    value is rejected with `{"message": "invalid query parameters: request_id
    (must be a number)"}`. - **Default:** when omitted, the server emits
    `request_id: 0` on every message.

    #### Core System Events

    - `ping`: Sent every 15 seconds for connection keep-alive.
      ```
      event: ping
      data: {"time": 1715162400}
      ```
    - `warning`: Non-breaking operational alerts (e.g., deprecation warnings).
      ```
      event: warning
      data: {"message": "Deprecation notice description"}
      ```
    - `error`: Sent prior to abnormal stream termination. The payload is always
    a single `{"message": "..."}` object.
      ```
      event: error
      data: {"message": "Error description"}
      ```
servers:
  - url: https://streaming.dexpaprika.com
    description: Production Streaming Gateway
security: []
paths:
  /stream:
    post:
      summary: Stream real-time data for multiple assets (Legacy)
      description: |
        **Deprecated:** Superseded by `/sse/prices`.
      operationId: streamBatchAssetPricesLegacy
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              maxItems: 25
              items:
                $ref: '#/components/schemas/AssetDataRequest'
      responses:
        '200':
          description: Legacy multiplexed SSE stream established.
        4XX:
          description: >-
            Client error (e.g., invalid payload, batch limit exceeded, or stream
            limit exceeded).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEvent'
      deprecated: true
components:
  schemas:
    AssetDataRequest:
      type: object
      required:
        - chain
        - address
        - method
      properties:
        chain:
          type: string
          example: ethereum
        address:
          type: string
          example: '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D'
        method:
          type: string
          enum:
            - token_price
            - t_p
          description: '`t_p` parameter format is deprecated and slated for future removal.'
        request_id:
          type: integer
          minimum: 0
          maximum: 4294967295
          description: >-
            Optional identifier for tracking multiplexed requests. If not
            provided for POST requests, defaults to the index in the array.
        filter:
          type: object
    ErrorEvent:
      type: object
      description: Runtime system stream rejection payload exception details.
      properties:
        message:
          type: string
          description: Machine-readable reason for connection fault or stream termination.
          example: 'invalid search query parameters: address (not found)'

````