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

# Subscribe to order status via SSE

> Returns `text/event-stream`. Each event id is
`<order_id>:<status>:<unix_ms>`. Reconnect with `Last-Event-ID`
header to resume from the in-memory ring buffer (60 s).

Response header `Privata-Resume-Source` is one of `buffer`,
`snapshot`, or `fresh`. When `snapshot` is returned,
`Privata-Resume-Gap-Ms` carries the gap to the last known event.




## OpenAPI

````yaml /api-reference/openapi.yaml get /order/{order_id}/stream
openapi: 3.1.0
info:
  title: Privata Wallet API
  version: 1.2.0
  summary: REST API for integrating Privata swap aggregator into crypto wallets.
  description: |
    Privata is a non-custodial swap aggregator. Wallets call this API to fetch
    quotes from 50+ providers, create exchange orders with deposit addresses,
    and track order lifecycle via webhooks or Server-Sent Events.

    Wire format is snake_case. The official JS/TS SDK (`@privata/wallet-api`)
    exposes camelCase and handles the conversion at the SDK boundary.
  contact:
    name: Privata partner support
    email: partners@privataswap.com
    url: https://docs.privataswap.com
  license:
    name: Proprietary
servers:
  - url: https://api.privataswap.com/partner/v1
    description: Production
  - url: https://api.privataswap.com/v2/exchange
    description: ChangeNOW-compatible layer (legacy clients)
security:
  - apiKey: []
tags:
  - name: Public
    description: Read endpoints. Work without an API key at lower rate-limit.
  - name: Orders
    description: Create and track exchange orders.
  - name: Refunds
    description: Refund capability and partner-confirmed refund actions.
  - name: Streaming
    description: SSE event stream for order status.
  - name: Webhooks
    description: Outbound HTTP callbacks to your endpoint.
  - name: Partner
    description: Self-service stats and history for the authenticated partner.
  - name: Health
    description: Uptime probe surface.
paths:
  /order/{order_id}/stream:
    get:
      tags:
        - Streaming
      summary: Subscribe to order status via SSE
      description: |
        Returns `text/event-stream`. Each event id is
        `<order_id>:<status>:<unix_ms>`. Reconnect with `Last-Event-ID`
        header to resume from the in-memory ring buffer (60 s).

        Response header `Privata-Resume-Source` is one of `buffer`,
        `snapshot`, or `fresh`. When `snapshot` is returned,
        `Privata-Resume-Gap-Ms` carries the gap to the last known event.
      parameters:
        - in: path
          name: order_id
          required: true
          schema:
            type: string
        - in: header
          name: Last-Event-ID
          required: false
          schema:
            type: string
      responses:
        '200':
          description: SSE stream
          headers:
            Privata-Resume-Source:
              schema:
                type: string
                enum:
                  - buffer
                  - snapshot
                  - fresh
            Privata-Resume-Gap-Ms:
              schema:
                type: integer
          content:
            text/event-stream:
              schema:
                type: string
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Partner API key issued in the dashboard. Use `pk_live_...` in
        production, `pk_test_...` against sandbox.

````