# 获取 Kalshi 市场

**API:** Data API

**Endpoint:** `GET /v1/beta/kalshi/markets`

**Tags:** Kalshi

使用文档记载的 status、ticker、event、series 和时间戳筛选条件列出预测市场。本契约包含 max_updated_ts，但未声明自由文本搜索参数。市场记录和分页请遵循响应结构。

### 计费参考

- 计量方式：按成功请求的固定成本计费。
- 参考请求估算：0.02 美元。

仅供参考的元数据，不是账户报价、保证价格或消费上限。资源额度不同于 Felo 额度。最终扣费以 Felo 计费记录为准。

## Base URL

- `https://openapi.felo.ai`

## Authentication

- `FeloBearerAuth` (http bearer, bearer format Felo API Key)
- `FeloApiKey` (apiKey in header `X-API-Key`)

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `cursor` | query | no | string | 分页游标。使用上一次响应返回的游标值获取下一页结果。第一页留空。 |
| `event_ticker` | query | no | string | 用于筛选的事件 ticker。仅支持单个事件 ticker。 |
| `limit` | query | no | integer, (int64), default: 100 | 每页结果数。默认 100，最大值为 1000。 |
| `max_close_ts` | query | no | integer, (int64) | 筛选在该 Unix 时间戳之前关闭的条目 |
| `max_created_ts` | query | no | integer, (int64) | 筛选在该 Unix 时间戳之前创建的条目 |
| `max_settled_ts` | query | no | integer, (int64) | 筛选在该 Unix 时间戳之前结算的条目 |
| `max_updated_ts` | query | no | integer, (int64) | 返回元数据更新时间早于或等于该 Unix 时间戳（秒）的市场。仅跟踪非交易类变更。可与 min_updated_ts 和 mve_filter=exclude 组合使用。也可与 series_ticker 组合，但此时要求 mve_filter=exclude。与其他筛选条件不兼容。 |
| `min_close_ts` | query | no | integer, (int64) | 筛选在该 Unix 时间戳之后关闭的条目 |
| `min_created_ts` | query | no | integer, (int64) | 筛选在该 Unix 时间戳之后创建的条目 |
| `min_settled_ts` | query | no | integer, (int64) | 筛选在该 Unix 时间戳之后结算的条目 |
| `min_updated_ts` | query | no | integer, (int64) | 返回元数据更新时间晚于该 Unix 时间戳（秒）的市场。仅跟踪非交易类变更。可与 max_updated_ts 和 mve_filter=exclude 组合使用。也可与 series_ticker 组合，但此时要求 mve_filter=exclude。与其他筛选条件不兼容。 |
| `mve_filter` | query | no | string, enum: "only", "exclude" | 按多变量事件（组合）筛选。'only' 仅返回多变量事件，'exclude' 排除多变量事件。 |
| `series_ticker` | query | no | string | 按系列 ticker 筛选 |
| `status` | query | no | string, enum: "unopened", "open", "paused", "closed", "settled" | 按市场状态筛选。留空则返回任意状态的市场。 |
| `tickers` | query | no | string | 按特定市场 ticker 筛选。以逗号分隔的市场 ticker 列表。 |

## Responses

### 200 — 市场获取成功

Headers:
- `X-Request-Id` (string) — 联系 Felo 支持时需提供的请求标识符。

**application/json**

Schema: `Response24B585A0A861_GetMarketsResponse` (`#/components/schemas/Response24B585A0A861_GetMarketsResponse`)

### 400 — 无法处理该请求。请检查请求参数。

### 401 — 需要有效的 Felo API 密钥。

### 402 — 由于未满足计费要求，请求无法继续。

### 403 — 该账户无权执行此操作。

### 429 — 已达到请求或支出限额。

### 502 — 服务无法完成该请求。

### 503 — API 或计费服务暂时不可用。

### 504 — 服务在处理请求时超时。

### default — 错误响应；上游透传响应可能采用提供方格式

**application/json**

Schema:

```json
{}
```

## Schema definitions

### Response24B585A0A861_ExchangeIndex

`#/components/schemas/Response24B585A0A861_ExchangeIndex`

```json
{
  "type": "integer",
  "description": "交易所分片的标识符。",
  "example": 0
}
```

### Response24B585A0A861_FixedPointCount

`#/components/schemas/Response24B585A0A861_FixedPointCount`

```json
{
  "type": "string",
  "description": "定点合约数量字符串（2 位小数，例如 \"10.00\"；在字段名中称为 \"fp\"）。请求接受 0–2 位小数（例如 \"10\"、\"10.0\"、\"10.00\"）；响应始终输出 2 位小数。支持小数合约值（例如 \"2.50\"）；最小粒度为 0.01 份合约。",
  "example": "10.00"
}
```

### Response24B585A0A861_FixedPointDollars

`#/components/schemas/Response24B585A0A861_FixedPointDollars`

```json
{
  "type": "string",
  "description": "定点美元字符串。多数请求字段接受 2–4 位小数（例如 \"0.56\"、\"0.5600\"）；响应最多输出 6 位小数。给定市场的有效报价间隔受该市场价格档位结构约束。",
  "example": "0.5600"
}
```

### Response24B585A0A861_GetMarketsResponse

`#/components/schemas/Response24B585A0A861_GetMarketsResponse`

```json
{
  "type": "object",
  "required": [
    "markets",
    "cursor"
  ],
  "properties": {
    "markets": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Response24B585A0A861_Market"
      }
    },
    "cursor": {
      "type": "string"
    }
  }
}
```

### Response24B585A0A861_Market

`#/components/schemas/Response24B585A0A861_Market`

```json
{
  "type": "object",
  "required": [
    "ticker",
    "event_ticker",
    "market_type",
    "yes_sub_title",
    "no_sub_title",
    "created_time",
    "updated_time",
    "open_time",
    "close_time",
    "latest_expiration_time",
    "settlement_timer_seconds",
    "status",
    "notional_value_dollars",
    "yes_bid_dollars",
    "yes_ask_dollars",
    "no_bid_dollars",
    "no_ask_dollars",
    "yes_bid_size_fp",
    "yes_ask_size_fp",
    "last_price_dollars",
    "previous_yes_bid_dollars",
    "previous_yes_ask_dollars",
    "previous_price_dollars",
    "volume_fp",
    "volume_24h_fp",
    "open_interest_fp",
    "result",
    "can_close_early",
    "expiration_value",
    "rules_primary",
    "rules_secondary",
    "price_level_structure",
    "price_ranges",
    "settlement_bounds_type"
  ],
  "properties": {
    "ticker": {
      "type": "string"
    },
    "event_ticker": {
      "type": "string"
    },
    "market_type": {
      "type": "string",
      "enum": [
        "binary",
        "scalar"
      ],
      "description": "标识市场类型"
    },
    "title": {
      "type": "string",
      "deprecated": true,
      "x-go-type-skip-optional-pointer": true
    },
    "subtitle": {
      "type": "string",
      "deprecated": true,
      "x-go-type-skip-optional-pointer": true
    },
    "yes_sub_title": {
      "type": "string",
      "description": "该市场 YES 一侧的简称"
    },
    "no_sub_title": {
      "type": "string",
      "description": "该市场 NO 一侧的简称"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "updated_time": {
      "type": "string",
      "format": "date-time",
      "description": "最近一次非交易类元数据更新的时间。"
    },
    "open_time": {
      "type": "string",
      "format": "date-time"
    },
    "close_time": {
      "type": "string",
      "format": "date-time"
    },
    "expected_expiration_time": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "x-omitempty": true,
      "description": "该市场的预期到期时间"
    },
    "expiration_time": {
      "type": "string",
      "format": "date-time",
      "deprecated": true,
      "x-go-type-skip-optional-pointer": true
    },
    "latest_expiration_time": {
      "type": "string",
      "format": "date-time",
      "description": "该市场可能的最晚到期时间"
    },
    "settlement_timer_seconds": {
      "type": "integer",
      "description": "市场确定后到结算之间的时间"
    },
    "status": {
      "type": "string",
      "enum": [
        "initialized",
        "inactive",
        "active",
        "closed",
        "determined",
        "disputed",
        "amended",
        "finalized"
      ],
      "description": "市场在生命周期中的当前状态。"
    },
    "yes_bid_dollars": {
      "$ref": "#/components/schemas/Response24B585A0A861_FixedPointDollars"
    },
    "yes_bid_size_fp": {
      "$ref": "#/components/schemas/Response24B585A0A861_FixedPointCount"
    },
    "yes_ask_dollars": {
      "$ref": "#/components/schemas/Response24B585A0A861_FixedPointDollars"
    },
    "yes_ask_size_fp": {
      "$ref": "#/components/schemas/Response24B585A0A861_FixedPointCount"
    },
    "no_bid_dollars": {
      "$ref": "#/components/schemas/Response24B585A0A861_FixedPointDollars"
    },
    "no_ask_dollars": {
      "$ref": "#/components/schemas/Response24B585A0A861_FixedPointDollars"
    },
    "last_price_dollars": {
      "$ref": "#/components/schemas/Response24B585A0A861_FixedPointDollars"
    },
    "volume_fp": {
      "$ref": "#/components/schemas/Response24B585A0A861_FixedPointCount"
    },
    "volume_24h_fp": {
      "$ref": "#/components/schemas/Response24B585A0A861_FixedPointCount"
    },
    "result": {
      "type": "string",
      "enum": [
        "yes",
        "no",
        "scalar",
        ""
      ]
    },
    "can_close_early": {
      "type": "boolean"
    },
    "open_interest_fp": {
      "$ref": "#/components/schemas/Response24B585A0A861_FixedPointCount"
    },
    "notional_value_dollars": {
      "$ref": "#/components/schemas/Response24B585A0A861_FixedPointDollars"
    },
    "previous_yes_bid_dollars": {
      "$ref": "#/components/schemas/Response24B585A0A861_FixedPointDollars"
    },
    "previous_yes_ask_dollars": {
      "$ref": "#/components/schemas/Response24B585A0A861_FixedPointDollars"
    },
    "previous_price_dollars": {
      "$ref": "#/components/schemas/Response24B585A0A861_FixedPointDollars"
    },
    "settlement_value_dollars": {
      "$ref": "#/components/schemas/Response24B585A0A861_FixedPointDollars"
    },
    "settlement_ts": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "x-omitempty": true,
      "description": "市场结算的时间戳。仅对已结算的市场填充"
    },
    "settlement_bounds_type": {
      "type": "string",
      "enum": [
        "default",
        "floor"
      ],
      "description": "适用于该市场的结算边界。default 表示该市场没有结算边界"
    },
    "settlement_floor_dollars": {
      "$ref": "#/components/schemas/Response24B585A0A861_FixedPointDollars"
    },
    "expiration_value": {
      "type": "string",
      "description": "结算时考虑的值"
    },
    "occurrence_datetime": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "底层事件发生时的记录日期时间（若有）"
    },
    "fee_waiver_expiration_time": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "x-omitempty": true,
      "description": "该市场手续费豁免的到期时间"
    },
    "early_close_condition": {
      "type": [
        "string",
        "null"
      ],
      "x-omitempty": true,
      "description": "市场可以提前关闭的条件",
      "x-go-type-skip-optional-pointer": true
    },
    "strike_type": {
      "type": "string",
      "enum": [
        "greater",
        "greater_or_equal",
        "less",
        "less_or_equal",
        "between",
        "functional",
        "custom",
        "structured"
      ],
      "x-omitempty": true,
      "description": "行权价类型定义市场行权价的设定与评估方式",
      "x-go-type-skip-optional-pointer": true
    },
    "floor_strike": {
      "type": [
        "number",
        "null"
      ],
      "format": "double",
      "x-omitempty": true,
      "description": "导致 YES 结算的最小到期值"
    },
    "cap_strike": {
      "type": [
        "number",
        "null"
      ],
      "format": "double",
      "x-omitempty": true,
      "description": "导致 YES 结算的最大到期值"
    },
    "functional_strike": {
      "type": [
        "string",
        "null"
      ],
      "x-omitempty": true,
      "description": "从到期值到结算值的映射"
    },
    "custom_strike": {
      "type": [
        "object",
        "null"
      ],
      "x-omitempty": true,
      "description": "每个目标导致 YES 结算的到期值"
    },
    "rules_primary": {
      "type": "string",
      "description": "对最重要的市场条款的通俗说明"
    },
    "rules_secondary": {
      "type": "string",
      "description": "对二级市场条款的通俗说明"
    },
    "mve_collection_ticker": {
      "type": "string",
      "x-omitempty": true,
      "description": "多变量事件集合的 ticker",
      "x-go-type-skip-optional-pointer": true
    },
    "mve_selected_legs": {
      "type": "array",
      "x-omitempty": true,
      "items": {
        "$ref": "#/components/schemas/Response24B585A0A861_MveSelectedLeg"
      },
      "x-go-type-skip-optional-pointer": true
    },
    "primary_participant_key": {
      "type": [
        "string",
        "null"
      ],
      "x-omitempty": true
    },
    "price_level_structure": {
      "type": "string",
      "description": "该市场的价格档位结构，定义价格区间和最小变动价位"
    },
    "price_ranges": {
      "type": "array",
      "description": "该市场订单的有效价格区间",
      "items": {
        "$ref": "#/components/schemas/Response24B585A0A861_PriceRange"
      }
    },
    "is_provisional": {
      "type": "boolean",
      "x-omitempty": true,
      "description": "为 true 时，市场在确定后若没有任何活动，可能会被移除",
      "x-go-type-skip-optional-pointer": true
    },
    "exchange_index": {
      "allOf": [
        {
          "$ref": "#/components/schemas/Response24B585A0A861_ExchangeIndex"
        }
      ],
      "x-go-type-skip-optional-pointer": true,
      "x-omitempty": false
    }
  }
}
```

### Response24B585A0A861_MveSelectedLeg

`#/components/schemas/Response24B585A0A861_MveSelectedLeg`

```json
{
  "type": "object",
  "properties": {
    "event_ticker": {
      "type": "string",
      "description": "所选事件的唯一标识符",
      "x-go-type-skip-optional-pointer": true
    },
    "market_ticker": {
      "type": "string",
      "description": "所选市场的唯一标识符",
      "x-go-type-skip-optional-pointer": true
    },
    "side": {
      "type": "string",
      "description": "所选市场的一侧",
      "x-go-type-skip-optional-pointer": true
    },
    "yes_settlement_value_dollars": {
      "$ref": "#/components/schemas/Response24B585A0A861_FixedPointDollars"
    }
  }
}
```

### Response24B585A0A861_PriceRange

`#/components/schemas/Response24B585A0A861_PriceRange`

```json
{
  "type": "object",
  "required": [
    "start",
    "end",
    "step"
  ],
  "properties": {
    "start": {
      "type": "string",
      "description": "该价格区间的起始价格（美元）"
    },
    "end": {
      "type": "string",
      "description": "该价格区间的结束价格（美元）"
    },
    "step": {
      "type": "string",
      "description": "该价格区间的价格步长/最小变动价位（美元）"
    }
  }
}
```
