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

# Get orderbook

> The book as bids only, per outcome, best price first. An offer to sell Up at p is the same liquidity as a bid for Down at 1 − p, so it is listed once, under `down`. `checksum` covers the full book's top 10 levels per side — the same number the websocket sends.



## OpenAPI

````yaml api-reference/openapi.json GET /markets/{ticker}/orderbook
openapi: 3.1.0
info:
  title: updown Trade API
  version: 1.0.0
  description: >-
    Public REST API. Market data needs no key; `/account` (and order entry, when
    it ships) takes an API key. Prices are dollar strings on the 1¢ grid, counts
    are contract strings, times are epoch ms. Generated from packages/protocol —
    do not edit by hand.
servers:
  - url: https://api.updown.fast/trade-api/v1
    description: production
security: []
paths:
  /markets/{ticker}/orderbook:
    get:
      summary: Get orderbook
      description: >-
        The book as bids only, per outcome, best price first. An offer to sell
        Up at p is the same liquidity as a bid for Down at 1 − p, so it is
        listed once, under `down`. `checksum` covers the full book's top 10
        levels per side — the same number the websocket sends.
      operationId: getOrderbook
      parameters:
        - name: ticker
          in: path
          required: true
          description: Market ticker
          schema:
            type: string
        - name: depth
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
      responses:
        '200':
          description: The book.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderbookResponse'
        '400':
          description: Invalid request (code BAD_REQUEST).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: MARKET_NOT_FOUND
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited (code RATE_LIMITED); wait `Retry-After` seconds.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: The book could not be read (code EXCHANGE_UNAVAILABLE); retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security: []
components:
  schemas:
    OrderbookResponse:
      type: object
      properties:
        orderbook:
          type: object
          properties:
            market_ticker:
              type: string
              pattern: ^[a-z0-9][a-z0-9-]{0,63}-\d{6}-\d{4}-\d{4}(d\d{1,2})?$
              description: >-
                Market ticker (one window of a series), e.g.
                "btc-15m-261002-1400-1415". Opaque.
            up:
              type: array
              items:
                type: array
                prefixItems:
                  - type: string
                    pattern: ^0\.(0[1-9]|[1-9]\d)$
                    description: >-
                      Contract price in dollars, "0.01"–"0.99" (v1: whole
                      cents).
                  - type: string
                    pattern: ^(0|[1-9]\d*)$
                    description: 'Contracts, as a string (v1: whole contracts).'
                description: '[price, contracts resting at that price]'
            down:
              type: array
              items:
                type: array
                prefixItems:
                  - type: string
                    pattern: ^0\.(0[1-9]|[1-9]\d)$
                    description: >-
                      Contract price in dollars, "0.01"–"0.99" (v1: whole
                      cents).
                  - type: string
                    pattern: ^(0|[1-9]\d*)$
                    description: 'Contracts, as a string (v1: whole contracts).'
                description: '[price, contracts resting at that price]'
            checksum:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            ts_ms:
              type: integer
              minimum: 0
              maximum: 9007199254740991
              description: Epoch milliseconds (UTC).
          required:
            - market_ticker
            - up
            - down
            - checksum
            - ts_ms
          additionalProperties: false
      required:
        - orderbook
      additionalProperties: false
    Error:
      type: object
      properties:
        code:
          type: string
          enum:
            - BAD_REQUEST
            - NOT_FOUND
            - SERIES_NOT_FOUND
            - MARKET_NOT_FOUND
            - METHOD_NOT_ALLOWED
            - RATE_LIMITED
            - UNAUTHORIZED
            - INTERNAL_ERROR
            - EXCHANGE_UNAVAILABLE
        message:
          type: string
        details:
          type: string
      required:
        - code
        - message
      additionalProperties: false

````

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