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

# List trades

> Tick-level trade history; walk `next_after` backwards for a backfill, or poll with `before` set to the newest trade id you have.

## 请求规范

* **方法与路径:** POST /apis/v1/api-exchange-coinbase-com/markets/list-trades
* **可用状态:** enabled
* **请求 URL 模板:** `https://api.aisa.one/apis/v1/api-exchange-coinbase-com/markets/list-trades`

[完整 OpenAPI 定义](https://aisa.one/docs/openapi/zh/api-exchange-coinbase-com.json)

有效请求声明（包括认证和引用的 schema）：

```json theme={null}
{
  "operationId": "api-exchange-coinbase-com.markets.list-trades",
  "method": "POST",
  "path": "/apis/v1/api-exchange-coinbase-com/markets/list-trades",
  "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": {
              "limit": 5,
              "product_id": "BTC-USD"
            }
          }
        },
        "schema": {
          "additionalProperties": true,
          "properties": {
            "after": {
              "description": "Return trades with an id lower than this (older). Use `next_after` from the previous page. Mutually exclusive with `before`.\n\nProvider reference: minimum 1.",
              "type": "number",
              "x-alexandria-option-metadata": {
                "in": "body",
                "min": 1
              }
            },
            "before": {
              "description": "Return trades with an id higher than this (newer). Mutually exclusive with `after`.\n\nProvider reference: minimum 1.",
              "type": "number",
              "x-alexandria-option-metadata": {
                "in": "body",
                "min": 1
              }
            },
            "limit": {
              "default": 100,
              "description": "Trades per page.\n\nProvider reference: minimum 1; maximum 1000; default 100.",
              "type": "number",
              "x-alexandria-option-metadata": {
                "in": "body",
                "max": 1000,
                "min": 1
              }
            },
            "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"
      }
    }
  }
}
```

## 费用与请求规则

按实际用量收费。 默认请求预估费用：\$0.0005 USD。 最终费用以实际用量为准。 账户适用价格可能不同；支持报价的接口可按实际请求获取报价。


## OpenAPI

````yaml openapi/zh/api-exchange-coinbase-com.json POST /apis/v1/api-exchange-coinbase-com/markets/list-trades
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/list-trades:
    post:
      tags:
        - Coinbase Exchange
      summary: List trades
      description: >-
        Tick-level trade history; walk `next_after` backwards for a backfill, or
        poll with `before` set to the newest trade id you have.
      operationId: api-exchange-coinbase-com.markets.list-trades
      requestBody:
        content:
          application/json:
            examples:
              provider:
                summary: >-
                  Official provider example; checked against AIsa request
                  constraints
                value:
                  limit: 5
                  product_id: BTC-USD
            schema:
              additionalProperties: true
              properties:
                after:
                  description: >-
                    Return trades with an id lower than this (older). Use
                    `next_after` from the previous page. Mutually exclusive with
                    `before`.


                    Provider reference: minimum 1.
                  type: number
                  x-alexandria-option-metadata:
                    in: body
                    min: 1
                before:
                  description: >-
                    Return trades with an id higher than this (newer). Mutually
                    exclusive with `after`.


                    Provider reference: minimum 1.
                  type: number
                  x-alexandria-option-metadata:
                    in: body
                    min: 1
                limit:
                  default: 100
                  description: |-
                    Trades per page.

                    Provider reference: minimum 1; maximum 1000; default 100.
                  type: number
                  x-alexandria-option-metadata:
                    in: body
                    max: 1000
                    min: 1
                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:
                    after: null
                    before: null
                    count: 5
                    limit: 5
                    newest_before: 1097948935
                    next_after: 1097948931
                    observed_at_ms: 1790268831436
                    product_id: BTC-USD
                    source_url: >-
                      https://api.exchange.coinbase.com/products/BTC-USD/trades?limit=5
                    trades:
                      - price: '84497.16000000'
                        side: buy
                        size: '0.00000024'
                        time: '2026-09-24T16:53:46.462964Z'
                        trade_id: 1097948935
                      - price: '84496.14000000'
                        side: buy
                        size: '0.00626960'
                        time: '2026-09-24T16:53:46.215642Z'
                        trade_id: 1097948934
                      - price: '84496.14000000'
                        side: buy
                        size: '0.00000003'
                        time: '2026-09-24T16:53:46.210569Z'
                        trade_id: 1097948933
                      - price: '84496.13000000'
                        side: buy
                        size: '0.00353505'
                        time: '2026-09-24T16:53:46.125396Z'
                        trade_id: 1097948932
                      - price: '84496.12000000'
                        side: buy
                        size: '0.00000030'
                        time: '2026-09-24T16:53:45.843530Z'
                        trade_id: 1097948931
              schema:
                not:
                  type: 'null'
                x-aisa-schema-completeness: documented-fields-only
          description: >-
            Recent trades for one trading pair (`GET
            /products/{product_id}/trades`), newest first, up to 1000 per page.
            Cursor pagination follows the exchange's `cb-after`/`cb-before`
            headers: pass `after` (a trade id) to get older trades, `before` to
            get newer ones. `next_after` is the cursor for the next older page.


            The response contains the tool result directly.


            The provider identifies `trades` as the primary payload key.


            | Documented field | Provider type | Description |

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

            | `price` | string | Decimal string exactly as the exchange sends it
            (never converted to a float). |

            | `side` | string | Maker side as the exchange reports it: `buy` or
            `sell`. |

            | `size` | string | Decimal string exactly as the exchange sends it
            (never converted to a float). |

            | `time` | string | RFC 3339 UTC. |

            | `trade_id` | number |  |



            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.