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

# Get Rate Stream

> Subscribe to real-time exchange rate updates via Server-Sent Events (SSE). The connection remains open and pushes rate updates as they occur.



## OpenAPI

````yaml GET /partners/marketplace/rates/stream
openapi: 3.1.0
info:
  title: HyperRail
  description: HyperRail documentation
  license:
    name: MIT
  version: 1.0.0
servers:
  - description: Live server
    url: https://api.hyperrails.io/api/v1
security:
  - bearerAuth: []
paths:
  /partners/marketplace/rates/stream:
    get:
      tags:
        - Rates
        - Streaming
      summary: Stream Real-Time Exchange Rates
      description: >-
        Subscribe to real-time exchange rate updates via Server-Sent Events
        (SSE). The connection remains open and pushes rate updates as they
        occur.
      parameters:
        - name: base
          in: query
          required: true
          description: The source currency code
          schema:
            type: string
            example: NGN
        - name: quote
          in: query
          required: true
          description: The target currency code (e.g., GHS).
          schema:
            type: string
            example: GHS
      responses:
        '200':
          description: >-
            Successfully established SSE connection. Rate updates will be pushed
            continuously.
          content:
            text/event-stream:
              schema:
                type: string
                description: Server-Sent Events stream with rate updates
                example: >+
                  event: rate_update

                  data:
                  {"from":"NGN","to":"USDT","rate":0.0006,"timestamp":"2026-04-14T10:30:00Z"}


                  event: rate_update

                  data:
                  {"from":"NGN","to":"USDT","rate":0.00061,"timestamp":"2026-04-14T10:30:15Z"}

              examples:
                streamExample:
                  summary: SSE rate updates
                  value: >+
                    event: rate_update

                    data:
                    {"from":"NGN","to":"USDT","rate":0.0006,"timestamp":"2026-04-14T10:30:00Z","source":"CONSENSUS","percentChange24h":-0.32}


                    event: heartbeat

                    data:
                    {"status":"connected","timestamp":"2026-04-14T10:31:00Z"}


                    event: rate_update

                    data:
                    {"from":"NGN","to":"USDT","rate":0.00061,"timestamp":"2026-04-14T10:31:05Z","source":"CONSENSUS","percentChange24h":-0.28}

          headers:
            Content-Type:
              description: Stream content type
              schema:
                type: string
                example: text/event-stream
            Cache-Control:
              description: Caching directive
              schema:
                type: string
                example: no-cache
            Connection:
              description: Connection type
              schema:
                type: string
                example: keep-alive
        '400':
          description: Bad request - Invalid or missing parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: INVALID_CURRENCY_PAIR
                message: >-
                  Invalid currency pair. Supported pairs: NGN/USDT, GHS/USDT,
                  NGN/GHS
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      required:
        - code
        - message
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: INVALID_CURRENCY
        message:
          type: string
          description: Error message
          example: 'Invalid source currency. Supported: NGN, GHS'
        details:
          type: object
          description: Additional error details
          additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: API key authentication using Bearer token

````