> ## 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 a single asset (Legacy)

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




## OpenAPI

````yaml get /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:
    get:
      summary: Stream real-time data for a single asset (Legacy)
      description: |
        **Deprecated:** Superseded by `/sse/prices`.
      operationId: streamSingleAssetPriceLegacy
      parameters:
        - name: method
          in: query
          required: true
          schema:
            type: string
            enum:
              - token_price
              - t_p
        - name: address
          in: query
          required: true
          schema:
            type: string
        - name: chain
          in: query
          required: true
          schema:
            type: string
        - name: request_id
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            maximum: 4294967295
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
      responses:
        '200':
          description: Legacy SSE stream established.
        4XX:
          description: >-
            Client error (e.g., invalid parameters, asset not found, or stream
            limit exceeded).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEvent'
      deprecated: true
components:
  schemas:
    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)'

````