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

Markets 获取 Kalshi 市场数据。AIsa 路由返回 Kalshi Trade API 的响应结构，其中包含顶层 `markets` 和 `cursor` 字段。

**最适合：** 按状态、ticker、事件 ticker、系列 ticker、时间戳或多变量事件筛选条件浏览 Kalshi 市场。

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

## 示例

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

## 响应

响应对象包含一个 `markets` 数组；当还有更多结果时，还会包含用于下一页的 `cursor` 字符串。市场对象包含 `ticker`、`event_ticker`、`title`、`status`、`yes_bid_dollars`、`yes_ask_dollars`、`no_bid_dollars`、`no_ask_dollars`、`volume_fp`、`volume_24h_fp` 和 `liquidity_dollars` 等 Kalshi 字段。


## OpenAPI

````yaml openapi/zh/kalshi-openapi.json GET /kalshi/markets
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/markets:
    get:
      summary: 获取 Kalshi 市场
      description: >-
        获取 Kalshi 市场数据。AIsa 返回 Kalshi Trade API 的响应结构，其中包含顶层 `markets` 和
        `cursor` 字段。
      operationId: get_kalshi-markets
      parameters:
        - name: tickers
          in: query
          required: false
          description: 要检索的 Kalshi 市场代码，以逗号分隔。
          schema:
            type: string
            example: KXMVESPORTSMULTIGAMEEXTENDED-S20268A776ACB3C6-43886DEE17A
        - name: event_ticker
          in: query
          required: false
          description: 按单个 Kalshi 事件代码筛选。
          schema:
            type: string
            example: KXMVESPORTSMULTIGAMEEXTENDED-S20268A776ACB3C6
        - name: search
          in: query
          required: false
          description: >-
            按标题和描述中的关键词搜索市场。必须进行 URL 编码（例如，用 'bitcoin%20price' 表示 'bitcoin
            price'）。
          schema:
            type: string
            example: bitcoin
        - name: status
          in: query
          required: false
          description: 按状态筛选市场。
          schema:
            type: string
            enum:
              - unopened
              - open
              - paused
              - closed
              - settled
            example: open
        - 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: series_ticker
          in: query
          required: false
          description: 按系列 ticker 筛选。
          schema:
            type: string
        - name: min_created_ts
          in: query
          required: false
          description: 筛选在此 Unix 时间戳之后创建的市场。
          schema:
            type: integer
            format: int64
        - name: max_created_ts
          in: query
          required: false
          description: 筛选在此 Unix 时间戳之前创建的市场。
          schema:
            type: integer
            format: int64
        - name: min_updated_ts
          in: query
          required: false
          description: 筛选在此 Unix 时间戳之后更新的市场。
          schema:
            type: integer
            format: int64
        - name: max_close_ts
          in: query
          required: false
          description: 筛选在此 Unix 时间戳之前关闭的市场。
          schema:
            type: integer
            format: int64
        - name: min_close_ts
          in: query
          required: false
          description: 筛选在此 Unix 时间戳之后关闭的市场。
          schema:
            type: integer
            format: int64
        - name: min_settled_ts
          in: query
          required: false
          description: 筛选在此 Unix 时间戳之后结算的市场。
          schema:
            type: integer
            format: int64
        - name: max_settled_ts
          in: query
          required: false
          description: 筛选在此 Unix 时间戳之前结算的市场。
          schema:
            type: integer
            format: int64
        - name: mve_filter
          in: query
          required: false
          description: 按多变量事件筛选。
          schema:
            type: string
            enum:
              - only
              - exclude
      responses:
        '200':
          description: 带分页的 Kalshi 市场响应
          content:
            application/json:
              schema:
                type: object
                properties:
                  cursor:
                    type: string
                    description: 下一页的游标。
                  markets:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
                      properties:
                        ticker:
                          type: string
                        event_ticker:
                          type: string
                        title:
                          type: string
                        status:
                          type: string
                        result:
                          type: string
                        market_type:
                          type: string
                        strike_type:
                          type: string
                        response_price_units:
                          type: string
                        yes_bid_dollars:
                          type: string
                        yes_ask_dollars:
                          type: string
                        no_bid_dollars:
                          type: string
                        no_ask_dollars:
                          type: string
                        last_price_dollars:
                          type: string
                        liquidity_dollars:
                          type: string
                        notional_value_dollars:
                          type: string
                        volume_fp:
                          type: string
                        volume_24h_fp:
                          type: string
                        open_interest_fp:
                          type: string
                        created_time:
                          type: string
                        updated_time:
                          type: string
                        open_time:
                          type: string
                        close_time:
                          type: string
                        expiration_time:
                          type: string
                        latest_expiration_time:
                          type: string
                        expected_expiration_time:
                          type: string
                        can_close_early:
                          type: boolean
                        fractional_trading_enabled:
                          type: boolean
                        custom_strike:
                          type: object
                          additionalProperties: true
                        mve_selected_legs:
                          type: array
                          items:
                            type: object
                            additionalProperties: true
                        rules_primary:
                          type: string
                        rules_secondary:
                          type: string
                required:
                  - markets
        '400':
          description: 错误请求 - 参数无效或验证错误
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Invalid limit parameter
                  message:
                    type: string
                    example: limit must be a number between 1 and 100
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: AISA API Key
      description: 您的 AIsa API 密钥，作为 Bearer token 提供。

````