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

# Kalshi 交易

> 获取 Kalshi 交易

Trades 获取已成交的 Kalshi 交易。AIsa 路由返回 Kalshi Trade API 的响应结构，其中包含顶层 `trades` 和 `cursor` 字段。

**最适合：** 查看近期交易、按市场 ticker 或时间戳筛选，以及选择包含或排除大宗交易。

**端点：** `GET /kalshi/trades`

## 示例

```curl theme={null}
curl -X GET "https://api.aisa.one/apis/v1/kalshi/trades?limit=5&is_block_trade=false" \
  -H "Authorization: Bearer $AISA_API_KEY"
```

## 响应

响应对象包含一个 `trades` 数组；当还有更多结果时，还会包含用于下一页的 `cursor` 字符串。交易对象包含 `trade_id`、`ticker`、`count_fp`、`yes_price_dollars`、`no_price_dollars`、`taker_side`、`taker_book_side`、`taker_outcome_side`、`is_block_trade` 和 `created_time` 等字段。


## OpenAPI

````yaml openapi/zh/kalshi-openapi.json GET /kalshi/trades
openapi: 3.0.3
info:
  title: AIsa API proxy
  description: 预测市场 API。
  version: 0.0.1
servers:
  - url: https://api.aisa.one/apis/v1
security:
  - BearerAuth: []
paths:
  /kalshi/trades:
    get:
      summary: 获取 Kalshi 交易
      description: 获取 Kalshi 交易。AIsa 返回 Kalshi Trade API 的响应结构，顶层包含 `trades` 和 `cursor` 字段。
      operationId: get_kalshi-trades
      parameters:
        - name: limit
          in: query
          required: false
          description: 每页结果数。默认为 100，最大值为 1000。
          schema:
            type: integer
            format: int64
            minimum: 0
            maximum: 1000
            default: 100
            example: 100
        - name: cursor
          in: query
          required: false
          description: 上一个响应中的分页游标。
          schema:
            type: string
        - name: ticker
          in: query
          required: false
          description: 按 Kalshi 市场代码筛选。
          schema:
            type: string
            example: KXMVESPORTSMULTIGAMEEXTENDED-S20268A776ACB3C6-43886DEE17A
        - name: min_ts
          in: query
          required: false
          description: 筛选此 Unix 时间戳之后的交易。
          schema:
            type: integer
            format: int64
        - name: max_ts
          in: query
          required: false
          description: 筛选此 Unix 时间戳之前的交易。
          schema:
            type: integer
            format: int64
        - name: is_block_trade
          in: query
          required: false
          description: 按交易是否为大宗交易进行筛选。省略此参数则返回所有交易。
          schema:
            type: boolean
            example: false
      responses:
        '200':
          description: 带分页的 Kalshi 交易响应
          content:
            application/json:
              schema:
                type: object
                properties:
                  cursor:
                    type: string
                    description: 下一页的游标。
                  trades:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
                      properties:
                        trade_id:
                          type: string
                        ticker:
                          type: string
                        count_fp:
                          type: string
                        yes_price_dollars:
                          type: string
                        no_price_dollars:
                          type: string
                        taker_side:
                          type: string
                        taker_book_side:
                          type: string
                        taker_outcome_side:
                          type: string
                        created_time:
                          type: string
                        is_block_trade:
                          type: boolean
                required:
                  - trades
        '400':
          description: 请求错误 - 参数无效
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Invalid parameters
                  message:
                    type: string
                    example: Invalid time range or parameters
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: AISA API Key
      description: 您的 AIsa API 密钥，作为 Bearer token 提供。

````