> ## 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 book

> Liquidity and spread at a point in time; use `depth` to bound the payload.

## Request contract

* **Method and path:** POST /apis/v1/api-exchange-coinbase-com/markets/get-order-book
* **Availability:** enabled
* **Request URL template:** `https://api.aisa.one/apis/v1/api-exchange-coinbase-com/markets/get-order-book`

[Complete OpenAPI definition](https://aisa.one/docs/openapi/api-exchange-coinbase-com.json)

Effective request declaration (including authentication and referenced schemas):

```json theme={null}
{
  "operationId": "api-exchange-coinbase-com.markets.get-order-book",
  "method": "POST",
  "path": "/apis/v1/api-exchange-coinbase-com/markets/get-order-book",
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ],
  "parameters": [],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "examples": {
          "provider": {
            "summary": "Official provider example; checked against AIsa request constraints",
            "value": {
              "depth": 3,
              "level": 2,
              "product_id": "BTC-USD"
            }
          }
        },
        "schema": {
          "additionalProperties": true,
          "properties": {
            "depth": {
              "default": 50,
              "description": "Maximum price levels per side to return for level 2 (level 1 always has one).\n\nProvider reference: minimum 1; maximum 1000; default 50.",
              "type": "number",
              "x-alexandria-option-metadata": {
                "in": "body",
                "max": 1000,
                "min": 1
              }
            },
            "level": {
              "default": 1,
              "description": "1 = best bid/ask only (default); 2 = aggregated book truncated to `depth`.\n\nProvider reference: allowed values [\"1\", \"2\"]; default 1.",
              "type": "number",
              "x-alexandria-option-metadata": {
                "in": "body",
                "oneOf": [
                  "1",
                  "2"
                ]
              }
            },
            "product_id": {
              "description": "Trading pair id `BASE-QUOTE` as listed by `list_products`, e.g. `BTC-USD`, `USELESS-USD`. Case-insensitive; the canonical upper-case id is returned. Pattern: ^[A-Za-z0-9]{1,20}-[A-Za-z0-9]{1,20}$.",
              "type": "string"
            }
          },
          "required": [
            "product_id"
          ],
          "type": "object"
        }
      }
    },
    "required": true
  },
  "x-aisa-status": "enabled",
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```

## Cost and request rules

Usage-based pricing. Default request estimate: \$0.0005 USD. The final charge depends on actual usage. Your account price may differ; use a request quote where supported.


## OpenAPI

````yaml openapi/api-exchange-coinbase-com.json POST /apis/v1/api-exchange-coinbase-com/markets/get-order-book
openapi: 3.1.0
info:
  description: ''
  title: Coinbase Exchange
  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:
    api-exchange-coinbase-com:
      description: ''
      title: Coinbase Exchange
      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: 98886532755d0ccfd5be075974252658edca439cb28857f87a5c351a56feb1aa
        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/api-exchange-coinbase-com/markets/get-candles
    - /apis/v1/api-exchange-coinbase-com/markets/get-currency
    - /apis/v1/api-exchange-coinbase-com/markets/get-order-book
    - /apis/v1/api-exchange-coinbase-com/markets/get-product
    - /apis/v1/api-exchange-coinbase-com/markets/get-ticker
    - /apis/v1/api-exchange-coinbase-com/markets/get-wrapped-asset
    - /apis/v1/api-exchange-coinbase-com/markets/list-currencies
    - /apis/v1/api-exchange-coinbase-com/markets/list-products
    - /apis/v1/api-exchange-coinbase-com/markets/list-trades
    - /apis/v1/api-exchange-coinbase-com/markets/list-volume-summary
  x-aisa-document:
    composer_version: '31'
    document_hash: sha256:a32c032110fa3d3617775b7ea1a06dd6c914c876620f35c756423088b2831b02
    facts_hash: 98886532755d0ccfd5be075974252658edca439cb28857f87a5c351a56feb1aa
    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: api-exchange-coinbase-com
servers:
  - url: https://api.aisa.one
security:
  - bearerAuth: []
paths:
  /apis/v1/api-exchange-coinbase-com/markets/get-order-book:
    post:
      tags:
        - Coinbase Exchange
      summary: Get order book
      description: >-
        Liquidity and spread at a point in time; use `depth` to bound the
        payload.
      operationId: api-exchange-coinbase-com.markets.get-order-book
      requestBody:
        content:
          application/json:
            examples:
              provider:
                summary: >-
                  Official provider example; checked against AIsa request
                  constraints
                value:
                  depth: 3
                  level: 2
                  product_id: BTC-USD
            schema:
              additionalProperties: true
              properties:
                depth:
                  default: 50
                  description: >-
                    Maximum price levels per side to return for level 2 (level 1
                    always has one).


                    Provider reference: minimum 1; maximum 1000; default 50.
                  type: number
                  x-alexandria-option-metadata:
                    in: body
                    max: 1000
                    min: 1
                level:
                  default: 1
                  description: >-
                    1 = best bid/ask only (default); 2 = aggregated book
                    truncated to `depth`.


                    Provider reference: allowed values ["1", "2"]; default 1.
                  type: number
                  x-alexandria-option-metadata:
                    in: body
                    oneOf:
                      - '1'
                      - '2'
                product_id:
                  description: >-
                    Trading pair id `BASE-QUOTE` as listed by `list_products`,
                    e.g. `BTC-USD`, `USELESS-USD`. Case-insensitive; the
                    canonical upper-case id is returned. Pattern:
                    ^[A-Za-z0-9]{1,20}-[A-Za-z0-9]{1,20}$.
                  type: string
              required:
                - product_id
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              examples:
                provider:
                  description: Published by the provider on 2026-09-24.
                  summary: Official provider example
                  value:
                    ask_levels_total: 18058
                    asks:
                      - num_orders: 1
                        price: '84509.59'
                        size: '0.11833712'
                      - num_orders: 1
                        price: '84511.76'
                        size: '0.09466139'
                      - num_orders: 1
                        price: '84512.37'
                        size: '0.11833712'
                    auction: null
                    auction_mode: false
                    bid_levels_total: 22830
                    bids:
                      - num_orders: 1
                        price: '84507.92'
                        size: '0.0992'
                      - num_orders: 1
                        price: '84506.92'
                        size: '0.03859996'
                      - num_orders: 2
                        price: '84505.9'
                        size: '0.10976422'
                    depth: 3
                    level: 2
                    observed_at_ms: 1790268816893
                    product_id: BTC-USD
                    sequence: 136712854999
                    source_url: >-
                      https://api.exchange.coinbase.com/products/BTC-USD/book?level=2
                    time: '2026-09-24T16:53:34.584522415Z'
                    truncated: true
              schema:
                not:
                  type: 'null'
                x-aisa-schema-completeness: documented-fields-only
          description: >-
            Aggregated order book for one trading pair (`GET
            /products/{product_id}/book?level=1|2`). Level 1 is the best bid and
            ask only; level 2 is the full aggregated book (thousands of price
            levels), truncated client-side to `depth` levels per side, best
            first. Level 3 (every individual order, ~6 MB) is not exposed.


            The response contains the tool result directly.


            | Documented field | Provider type | Description |

            | --- | --- | --- |

            | `ask_levels_total` | number | Price levels the exchange returned
            on the ask side before truncation. |

            | `asks` | object[] | Best ask first. |

            | `auction` | object | The exchange's auction block when a product
            is in auction mode; passed through unchanged, null otherwise. |

            | `auction_mode` | boolean |  |

            | `bid_levels_total` | number | Price levels the exchange returned
            on the bid side before truncation. |

            | `bids` | object[] | Best bid first. |

            | `depth` | number | Depth applied per side. |

            | `level` | number |  |

            | `observed_at_ms` | number | Milliseconds since the Unix epoch when
            this call ran. |

            | `product_id` | string |  |

            | `sequence` | number | Exchange book sequence number. |

            | `source_url` | string | The upstream request URL this record was
            shaped from. |

            | `time` | string | Book snapshot time, RFC 3339 UTC; null when the
            exchange omits it. |

            | `truncated` | boolean | True when either side was cut to `depth`.
            |



            These are the provider's documented fields. Field requiredness,
            nullability and nested object structures are specified only where
            the descriptions explicitly say so.
        default:
          content:
            application/json:
              schema: {}
          description: >-
            Error response; upstream passthrough responses may use provider
            formats
components:
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

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