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

# Get live orderbooks for multiple markets

> Returns live per-venue orderbooks for the explicit venueMarketIds requested. `venueMarketIds` accepts either a comma-separated string (`?venueMarketIds=a,b,c`) or repeated params (`?venueMarketIds=a&venueMarketIds=b`). This is the only supported public REST endpoint for current orderbook reads.



## OpenAPI

````yaml /openapi/openapi.json get /orderbooks
openapi: 3.0.2
info:
  title: AGG API
  version: 1.0.0
  description: >-
    Prediction market aggregator REST API — authentication, users, venue events,
    venue markets, orderbooks, charts, and execution workflows.
servers:
  - url: https://api.agg.market
    description: Production
  - url: https://api.staging.agg.market
    description: Staging
security: []
paths:
  /orderbooks:
    get:
      tags:
        - Orderbook
      summary: Get live orderbooks for multiple markets
      description: >-
        Returns live per-venue orderbooks for the explicit venueMarketIds
        requested. `venueMarketIds` accepts either a comma-separated string
        (`?venueMarketIds=a,b,c`) or repeated params
        (`?venueMarketIds=a&venueMarketIds=b`). This is the only supported
        public REST endpoint for current orderbook reads.
      operationId: getOrderbooks
      parameters:
        - name: venueMarketIds
          in: query
          required: true
          schema:
            anyOf:
              - maxItems: 20
                type: array
                items:
                  type: string
              - type: string
        - name: depth
          in: query
          required: false
          schema:
            minimum: 1
            maximum: 100
            type: integer
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - meta
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      required:
                        - venueMarketId
                        - status
                        - error
                        - requestedMarket
                        - venueOrderbooks
                        - matchedMarkets
                      properties:
                        venueMarketId:
                          type: string
                        status:
                          type: string
                          enum:
                            - ok
                            - market_not_found
                            - market_resolved
                            - market_closed
                            - market_paused
                            - market_unopened
                            - book_not_loaded
                        error:
                          type: object
                          required:
                            - code
                            - message
                            - retryable
                          properties:
                            code:
                              type: string
                              enum:
                                - market_not_found
                                - market_resolved
                                - market_closed
                                - market_paused
                                - market_unopened
                                - book_not_loaded
                            message:
                              type: string
                            retryable:
                              type: boolean
                          nullable: true
                        requestedMarket:
                          type: object
                          required:
                            - venueMarketId
                            - venue
                            - marketStatus
                            - tickSize
                            - endDate
                            - resolutionDate
                          properties:
                            venueMarketId:
                              type: string
                            venue:
                              type: string
                              enum:
                                - kalshi
                                - polymarket
                                - limitless
                                - opinion
                                - predict
                                - probable
                                - myriad
                                - hyperliquid
                            marketStatus:
                              type: string
                              enum:
                                - open
                                - closed
                                - resolved
                                - unopened
                                - paused
                            tickSize:
                              type: number
                              nullable: true
                            endDate:
                              type: string
                              nullable: true
                            resolutionDate:
                              type: string
                              nullable: true
                          nullable: true
                        venueOrderbooks:
                          type: object
                          additionalProperties:
                            type: object
                            required:
                              - venueMarketId
                              - tickSize
                              - orderbook
                            properties:
                              venueMarketId:
                                type: string
                              tickSize:
                                type: number
                                nullable: true
                              orderbook:
                                type: object
                                required:
                                  - bids
                                  - asks
                                properties:
                                  bids:
                                    type: array
                                    items:
                                      type: object
                                      required:
                                        - price
                                        - size
                                      properties:
                                        price:
                                          minimum: 0
                                          maximum: 1
                                          type: number
                                        size:
                                          minimum: 0
                                          type: number
                                  asks:
                                    type: array
                                    items:
                                      type: object
                                      required:
                                        - price
                                        - size
                                      properties:
                                        price:
                                          minimum: 0
                                          maximum: 1
                                          type: number
                                        size:
                                          minimum: 0
                                          type: number
                                  negRisk:
                                    type: boolean
                              tick:
                                type: number
                                nullable: true
                              markSource:
                                type: string
                                enum:
                                  - local
                                  - local_merged
                                  - local_one_sided
                                  - sibling
                                  - local_boundary
                                  - local_stub
                                  - none
                        matchedMarkets:
                          type: array
                          items:
                            type: object
                            required:
                              - venue
                              - venueMarketId
                              - marketStatus
                              - tickSize
                              - hasOrderbook
                            properties:
                              venue:
                                type: string
                                enum:
                                  - kalshi
                                  - polymarket
                                  - limitless
                                  - opinion
                                  - predict
                                  - probable
                                  - myriad
                                  - hyperliquid
                              venueMarketId:
                                type: string
                              marketStatus:
                                type: string
                                enum:
                                  - open
                                  - closed
                                  - resolved
                                  - unopened
                                  - paused
                              tickSize:
                                type: number
                                nullable: true
                              hasOrderbook:
                                type: boolean
                  meta:
                    type: object
                    required:
                      - requestedCount
                      - okCount
                      - errorCount
                    properties:
                      requestedCount:
                        minimum: 0
                        type: integer
                      okCount:
                        minimum: 0
                        type: integer
                      errorCount:
                        minimum: 0
                        type: integer
        '400':
          description: '400'
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                properties:
                  message:
                    type: string
        '401':
          description: '401'
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                properties:
                  message:
                    type: string
        '403':
          description: '403'
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                properties:
                  message:
                    type: string
        '503':
          description: '503'
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - message
                  - retryable
                properties:
                  code:
                    type: string
                    enum:
                      - orderbook_service_unavailable
                  message:
                    type: string
                  retryable:
                    type: boolean
      security:
        - appId: []
components:
  securitySchemes:
    appId:
      type: apiKey
      in: header
      name: x-app-id
      description: Your application ID. Required for all app-tier and user-tier routes.

````