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

# Subscribe to order book updates via SSE



## OpenAPI

````yaml https://vooi-api-app.fly.dev/swagger/json get /exchange/updates-orderbook
openapi: 3.1.0
info:
  title: VOOI API
  description: Unified perps API
  version: '1.0'
  contact: {}
servers:
  - url: https://perps-api.vooi.io
security: []
tags: []
paths:
  /exchange/updates-orderbook:
    get:
      tags:
        - Exchange
      summary: Subscribe to order book updates via SSE
      operationId: ExchangeController_subscribeToOrderBook
      parameters:
        - name: asset
          required: true
          in: query
          schema:
            type: string
            minLength: 1
            example: ETH
          description: Asset to subscribe on
        - name: exchanges
          required: false
          in: query
          schema:
            anyOf:
              - type: string
                enum:
                  - aster
                  - binance
                  - bybit
                  - extended
                  - gate
                  - hyperliquid
                  - lighter
                  - mexc
                  - ondo
                  - robinhood
                description: Supported perpetual exchange
              - type: array
                items:
                  type: string
                  enum:
                    - aster
                    - binance
                    - bybit
                    - extended
                    - gate
                    - hyperliquid
                    - lighter
                    - mexc
                    - ondo
                    - robinhood
                  description: Supported perpetual exchange
          description: Exchange(s) to subscribe on
        - name: levels
          required: false
          in: query
          schema:
            type: string
          description: Number of levels to subscribe on
        - name: significantFigures
          required: false
          in: query
          schema:
            type: string
          description: Significant figures to subscribe on
      responses:
        '503':
          description: ExchangeApiError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDTO'
        default:
          description: >-
            Server-Sent Events stream. Event types:

            - **orderBookSnapshot**: { bids, asks, marketId, exchange, timestamp
            } — full book. Sent immediately on connect, then re-sent every 10
            seconds so a client that missed a diff can resynchronise. Its
            timestamp only advances while diffs are flowing.

            - **orderBookDiff**: { bids, asks, marketId, exchange, timestamp } —
            only changed price levels since the previous frame. A level that has
            been removed is emitted as { price, size: '0' }.

            Use 'levels' and 'significantFigures' query params to customize the
            response.
components:
  schemas:
    ErrorResponseDTO:
      type: object
      properties:
        message:
          type: string
          example: 'Invalid order id: 123'
        statusCode:
          example: 503
          type: number
      required:
        - message
      title: ErrorResponse

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.