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

# Get order book



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/gemini/v1/book/{symbol}
openapi: 3.1.0
info:
  title: Graylayer Market Proxy
  description: >-
    A unified API gateway for Polymarket, Kalshi, Gemini, Coinbase, and
    Forecastex. Authenticate with X-API-Key header. The proxy forwards requests
    to upstream platform APIs and handles platform-specific auth (e.g. Kalshi
    RSA-PSS signing) automatically.
  version: 1.0.0
  license:
    name: MIT
servers:
  - url: http://gateway.graylayer.tech
    description: Production server
security:
  - apiKey: []
tags:
  - name: Polymarket US
    description: >-
      Events, markets, series, sports, and search. Platform key:
      `polymarket-us`. Upstream: https://gateway.polymarket.us/v1
  - name: Kalshi
    description: >-
      Markets, events, series, orderbooks, historical data, and more. Platform
      key: `kalshi`. Upstream: https://api.elections.kalshi.com/trade-api/v2
  - name: Health
  - name: Gemini
    description: >-
      Prediction market categories, events, market data. Platform key: `gemini`.
      Upstream: https://api.gemini.com
  - name: Forecastex
    description: >-
      IBKR event contract data (read-only). Platform key: `forecastex`. Paths
      route to forecastex.com or IBKR Client Portal Gateway.
  - name: Coinbase
    description: >-
      Spot exchange market data. Platform key: `coinbase`. Upstream:
      https://api.exchange.coinbase.com
paths:
  /api/v1/gemini/v1/book/{symbol}:
    get:
      tags:
        - Gemini
      summary: Get order book
      operationId: gemini-get-book
      parameters:
        - name: symbol
          in: path
          required: true
          schema:
            type: string
          example: BTCUSD
        - name: limit_bids
          in: query
          schema:
            type: integer
          description: Limit number of bids returned
        - name: limit_asks
          in: query
          schema:
            type: integer
          description: Limit number of asks returned
      responses:
        '200':
          description: Order book
          content:
            application/json:
              schema:
                type: object
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  responses:
    Unauthorized:
      description: Missing or invalid X-API-Key header
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: unauthorized
            message: Invalid API key
  schemas:
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
          description: Error code
        message:
          type: string
          description: Human-readable error message
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'API key. Request one in #api-key-request on the Graylayer Discord.'
      x-default-value: ak_5df2684542e81976d862be0969ce4878ba47e3d21822d905

````