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

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# Get order books (request body)

> Retrieves order book summaries for multiple token IDs using a request body.

## Request contract

* **Method and path:** POST /apis/v1/polymarket/books
* **Availability:** enabled
* **Request URL template:** `https://api.aisa.one/apis/v1/polymarket/books`

[Complete OpenAPI definition](https://aisa.one/docs/openapi/polymarket-clob.json)

Effective request declaration (including authentication and referenced schemas):

```json theme={null}
{
  "operationId": "post_any_polymarket_clob_apis_v1_polymarket_books",
  "method": "POST",
  "path": "/apis/v1/polymarket/books",
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ],
  "parameters": [],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "example": [
          {
            "token_id": "0xabc123def456..."
          },
          {
            "token_id": "0xdef456abc123..."
          }
        ],
        "schema": {
          "items": {
            "properties": {
              "side": {
                "description": "Order side (optional, not used for midpoint calculation)",
                "enum": [
                  "BUY",
                  "SELL"
                ],
                "example": "BUY",
                "type": "string"
              },
              "token_id": {
                "description": "Token ID (asset ID)",
                "example": "0xabc123def456...",
                "type": "string"
              }
            },
            "required": [
              "token_id"
            ],
            "type": "object"
          },
          "type": "array"
        }
      }
    },
    "required": true
  },
  "x-aisa-status": "enabled",
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```

## Cost and request rules

Published reference price: \$0.012 USD per successful request. Your account price may differ; use a request quote where supported.


## OpenAPI

````yaml openapi/polymarket-clob.json POST /apis/v1/polymarket/books
openapi: 3.1.0
info:
  description: ''
  title: Polymarket Clob
  version: '1'
  x-aisa-capabilities:
    idempotency: Idempotency-Key
    max_price: X-AISA-Max-Price-USD
    quote:
      header: X-AISA-Cost-Mode
      value: quote
  x-aisa-catalogs:
    polymarket-clob:
      description: ''
      title: Polymarket Clob
      x-aisa-capabilities:
        idempotency: Idempotency-Key
        max_price: X-AISA-Max-Price-USD
        quote:
          header: X-AISA-Cost-Mode
          value: quote
      x-aisa-document:
        facts_hash: 82aea6f2c4f7a597f13ad38b776372a5289186335dfd2ac574ce675f273fca4f
        generator_version: '3'
        protocol_version: '1'
        schema_version: '1'
      x-aisa-plans:
        builder: 1
        display_plan: payg
        payg: 1
        similarweb_payg: 1
        team: 1
        version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-configured-paths:
    - /apis/v1/polymarket/batch-prices-history
    - /apis/v1/polymarket/book
    - /apis/v1/polymarket/books
    - /apis/v1/polymarket/builder/trades
    - /apis/v1/polymarket/cancel-all
    - /apis/v1/polymarket/cancel-market-orders
    - /apis/v1/polymarket/clob-markets/{condition_id}
    - /apis/v1/polymarket/data/orders
    - /apis/v1/polymarket/fee-rate
    - /apis/v1/polymarket/fee-rate/{token_id}
    - /apis/v1/polymarket/heartbeats
    - /apis/v1/polymarket/last-trade-price
    - /apis/v1/polymarket/last-trades-prices
    - /apis/v1/polymarket/markets-by-token/{token_id}
    - /apis/v1/polymarket/midpoint
    - /apis/v1/polymarket/midpoints
    - /apis/v1/polymarket/order
    - /apis/v1/polymarket/order-scoring
    - /apis/v1/polymarket/order/{orderID}
    - /apis/v1/polymarket/orders
    - /apis/v1/polymarket/price
    - /apis/v1/polymarket/prices
    - /apis/v1/polymarket/prices-history
    - /apis/v1/polymarket/rebates/current
    - /apis/v1/polymarket/rewards/markets/current
    - /apis/v1/polymarket/rewards/markets/multi
    - /apis/v1/polymarket/rewards/markets/{condition_id}
    - /apis/v1/polymarket/rewards/user
    - /apis/v1/polymarket/rewards/user/markets
    - /apis/v1/polymarket/rewards/user/percentages
    - /apis/v1/polymarket/rewards/user/total
    - /apis/v1/polymarket/sampling-markets
    - /apis/v1/polymarket/sampling-simplified-markets
    - /apis/v1/polymarket/simplified-markets
    - /apis/v1/polymarket/spread
    - /apis/v1/polymarket/spreads
    - /apis/v1/polymarket/tick-size
    - /apis/v1/polymarket/tick-size/{token_id}
    - /apis/v1/polymarket/time
    - /apis/v1/polymarket/trades
  x-aisa-document:
    composer_version: '31'
    document_hash: sha256:a8dc9693db633e057fbb37a09c8dbc478620caf7f198add821694f86cdc66850
    facts_hash: 82aea6f2c4f7a597f13ad38b776372a5289186335dfd2ac574ce675f273fca4f
    generator_version: '3'
    protocol_version: '1'
    response_pending: []
    schema_version: '1'
  x-aisa-plans:
    builder: 1
    display_plan: payg
    payg: 1
    similarweb_payg: 1
    team: 1
    version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-provider: polymarket-clob
servers:
  - url: https://api.aisa.one
security:
  - bearerAuth: []
paths:
  /apis/v1/polymarket/books:
    post:
      tags:
        - default
      summary: Get order books (request body)
      description: >-
        Retrieves order book summaries for multiple token IDs using a request
        body.
      operationId: post_any_polymarket_clob_apis_v1_polymarket_books
      requestBody:
        content:
          application/json:
            example:
              - token_id: 0xabc123def456...
              - token_id: 0xdef456abc123...
            schema:
              items:
                properties:
                  side:
                    description: Order side (optional, not used for midpoint calculation)
                    enum:
                      - BUY
                      - SELL
                    example: BUY
                    type: string
                  token_id:
                    description: Token ID (asset ID)
                    example: 0xabc123def456...
                    type: string
                required:
                  - token_id
                type: object
              type: array
        required: true
      responses:
        '200':
          content:
            application/json:
              example:
                - asks:
                    - price: '0.46'
                      size: '150'
                  asset_id: 0xabc123def456...
                  bids:
                    - price: '0.45'
                      size: '100'
                  hash: a1b2c3d4e5f6...
                  last_trade_price: '0.45'
                  market: '0x1234567890123456789012345678901234567890'
                  min_order_size: '1'
                  neg_risk: false
                  tick_size: '0.01'
                  timestamp: '1234567890'
              schema:
                items:
                  $ref: '#/components/schemas/ResponseDc26E95Ff83E_OrderBookSummary'
                type: array
          description: Successfully retrieved order books
        default:
          content:
            application/json:
              schema: {}
          description: >-
            Error response; upstream passthrough responses may use provider
            formats
      x-codeSamples:
        - label: Reference example
          lang: text
          source: >-
            # Fixed reference example. Playground inputs do not update this
            sample.

            curl --request POST \
              --url https://api.aisa.one/apis/v1/polymarket/books \
              --header 'Authorization: Bearer <token>' \
              --header 'Content-Type: application/json' \
              --data '[
              {
                "token_id": "0xabc123def456..."
              },
              {
                "token_id": "0xdef456abc123..."
              }
            ]'
components:
  schemas:
    ResponseDc26E95Ff83E_OrderBookSummary:
      properties:
        asks:
          description: List of ask orders (sorted by price ascending)
          items:
            $ref: '#/components/schemas/ResponseDc26E95Ff83E_OrderSummary'
          type: array
        asset_id:
          description: Token ID (asset ID)
          example: 0xabc123def456...
          type: string
        bids:
          description: List of bid orders (sorted by price descending)
          items:
            $ref: '#/components/schemas/ResponseDc26E95Ff83E_OrderSummary'
          type: array
        hash:
          description: Hash of the order book summary
          example: a1b2c3d4e5f6...
          type: string
        last_trade_price:
          description: Last trade price
          example: '0.45'
          type: string
        market:
          description: Market condition ID
          example: '0x1234567890123456789012345678901234567890'
          type: string
        min_order_size:
          description: Minimum order size
          example: '1'
          type: string
        neg_risk:
          description: Whether negative risk is enabled for this market
          example: false
          type: boolean
        tick_size:
          description: Minimum price increment (tick size)
          example: '0.01'
          type: string
        timestamp:
          description: Timestamp of the order book snapshot
          example: '1234567890'
          type: string
      required:
        - market
        - asset_id
        - timestamp
        - hash
        - bids
        - asks
        - min_order_size
        - tick_size
        - neg_risk
        - last_trade_price
      type: object
    ResponseDc26E95Ff83E_OrderSummary:
      properties:
        price:
          description: Order price
          example: '0.45'
          type: string
        size:
          description: Order size
          example: '100'
          type: string
      required:
        - price
        - size
      type: object
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

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