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

# Get Orderbook

> Get orderbook for a centos_id.



## OpenAPI

````yaml /openapi.json get /v1/orderbooks/{centos_id}
openapi: 3.1.0
info:
  title: Centos Finance API
  contact:
    name: Centos Finance
    url: https://centosfi.com/
  license:
    name: Proprietary
  version: 1.0.0
servers:
  - url: https://api.centosfi.com
security: []
tags:
  - name: markets
    description: Search and discover prediction markets across Kalshi and Polymarket.
  - name: subaccounts
    description: >-
      Manage trading subaccounts. Each subaccount can have its own exchange
      credentials and positions.
  - name: positions
    description: View current portfolio positions across all connected exchanges.
  - name: fills
    description: Retrieve trade execution history and fill details.
  - name: prices
    description: Get historical price data and candlesticks from exchanges.
  - name: orders
    description: Place and manage orders on prediction market exchanges.
  - name: complex-orders
    description: >-
      Manage complex orders: conditional orders (take-profit and stop-loss),
      TWAP, and other advanced order types.
paths:
  /v1/orderbooks/{centos_id}:
    get:
      tags:
        - orderbooks
      summary: Get Orderbook
      description: Get orderbook for a centos_id.
      operationId: get_orderbook_v1_orderbooks__centos_id__get
      parameters:
        - name: centos_id
          in: path
          required: true
          schema:
            type: integer
            title: Centos Id
        - name: levels
          in: query
          required: false
          schema:
            type: integer
            maximum: 10
            minimum: 1
            description: Number of price levels to return
            default: 10
            title: Levels
          description: Number of price levels to return
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderbookResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    OrderbookResponse:
      properties:
        status:
          $ref: '#/components/schemas/OrderbookStatus'
        orderbook:
          anyOf:
            - $ref: '#/components/schemas/OrderbookData'
            - type: 'null'
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
      type: object
      required:
        - status
      title: OrderbookResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    OrderbookStatus:
      type: string
      enum:
        - ok
        - pending
        - not_found
      title: OrderbookStatus
    OrderbookData:
      properties:
        centos_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Centos Id
        custom_asset_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Custom Asset Id
        bids:
          items:
            $ref: '#/components/schemas/PriceLevelResponse'
          type: array
          title: Bids
        asks:
          items:
            $ref: '#/components/schemas/PriceLevelResponse'
          type: array
          title: Asks
        best_bid_price:
          anyOf:
            - type: number
            - type: 'null'
          title: Best Bid Price
        best_ask_price:
          anyOf:
            - type: number
            - type: 'null'
          title: Best Ask Price
        exchange_timestamp:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Exchange Timestamp
          description: Exchange orderbook timestamp (UTC)
      type: object
      required:
        - bids
        - asks
        - best_bid_price
        - best_ask_price
      title: OrderbookData
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    PriceLevelResponse:
      properties:
        price:
          type: number
          title: Price
        qty:
          type: number
          title: Qty
      type: object
      required:
        - price
        - qty
      title: PriceLevelResponse

````