# Lấy thị trường Kalshi

**API:** Data API

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

**Tags:** Kalshi

Liệt kê thị trường dự đoán bằng các bộ lọc status, ticker, event, series và timestamp được ghi trong tài liệu. Hợp đồng có bao gồm max_updated_ts nhưng không khai báo tham số tìm kiếm văn bản tự do. Xem schema phản hồi để biết bản ghi thị trường và phân trang.

### Tham chiếu giá

- Đo lường: Cơ sở chi phí cố định theo yêu cầu thành công.
- Ước tính tham chiếu cho mỗi yêu cầu: USD 0.02.

Chỉ là siêu dữ liệu tham chiếu, không phải báo giá cho tài khoản, mức giá được bảo đảm hay hạn mức chi tiêu. Tín dụng tài nguyên không phải tín dụng Felo. Khoản phí cuối cùng tuân theo bản ghi thanh toán của 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 | Con trỏ phân trang. Dùng giá trị con trỏ được trả về từ phản hồi trước để lấy trang kết quả tiếp theo. Để trống cho trang đầu tiên. |
| `event_ticker` | query | no | string | Ticker sự kiện cần lọc. Chỉ hỗ trợ một ticker sự kiện duy nhất. |
| `limit` | query | no | integer, (int64), default: 100 | Số kết quả mỗi trang. Mặc định là 100. Giá trị tối đa là 1000. |
| `max_close_ts` | query | no | integer, (int64) | Lọc các mục đóng trước dấu thời gian Unix này |
| `max_created_ts` | query | no | integer, (int64) | Lọc các mục được tạo trước dấu thời gian Unix này |
| `max_settled_ts` | query | no | integer, (int64) | Lọc các mục được quyết toán trước dấu thời gian Unix này |
| `max_updated_ts` | query | no | integer, (int64) | Trả về các thị trường có siêu dữ liệu được cập nhật tại hoặc trước dấu thời gian Unix này (tính bằng giây). Chỉ theo dõi các thay đổi không liên quan đến giao dịch. Có thể kết hợp với min_updated_ts và mve_filter=exclude. Cũng có thể kết hợp với series_ticker, yêu cầu mve_filter=exclude. Không tương thích với các bộ lọc khác. |
| `min_close_ts` | query | no | integer, (int64) | Lọc các mục đóng sau dấu thời gian Unix này |
| `min_created_ts` | query | no | integer, (int64) | Lọc các mục được tạo sau dấu thời gian Unix này |
| `min_settled_ts` | query | no | integer, (int64) | Lọc các mục được quyết toán sau dấu thời gian Unix này |
| `min_updated_ts` | query | no | integer, (int64) | Trả về các thị trường có siêu dữ liệu được cập nhật muộn hơn dấu thời gian Unix này (tính bằng giây). Chỉ theo dõi các thay đổi không liên quan đến giao dịch. Có thể kết hợp với max_updated_ts và mve_filter=exclude. Cũng có thể kết hợp với series_ticker, yêu cầu mve_filter=exclude. Không tương thích với các bộ lọc khác. |
| `mve_filter` | query | no | string, enum: "only", "exclude" | Lọc theo sự kiện đa biến (combo). 'only' chỉ trả về sự kiện đa biến, 'exclude' loại trừ sự kiện đa biến. |
| `series_ticker` | query | no | string | Lọc theo ticker chuỗi |
| `status` | query | no | string, enum: "unopened", "open", "paused", "closed", "settled" | Lọc theo trạng thái thị trường. Để trống để trả về thị trường ở mọi trạng thái. |
| `tickers` | query | no | string | Lọc theo các ticker thị trường cụ thể. Danh sách ticker thị trường được phân tách bằng dấu phẩy cần lấy. |

## Responses

### 200 — Truy xuất thị trường thành công

Headers:
- `X-Request-Id` (string) — Mã định danh yêu cầu cần bao gồm khi liên hệ bộ phận hỗ trợ Felo.

**application/json**

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

### 400 — Không thể xử lý yêu cầu. Hãy kiểm tra các tham số yêu cầu.

### 401 — Cần có khóa API Felo hợp lệ.

### 402 — Không thể tiếp tục yêu cầu vì chưa đáp ứng yêu cầu thanh toán.

### 403 — Tài khoản không được phép thực hiện thao tác này.

### 429 — Đã đạt giới hạn yêu cầu hoặc giới hạn chi tiêu.

### 502 — Dịch vụ không thể hoàn tất yêu cầu.

### 503 — API hoặc dịch vụ thanh toán tạm thời không khả dụng.

### 504 — Dịch vụ đã hết thời gian chờ khi xử lý yêu cầu.

### default — Phản hồi lỗi; phản hồi chuyển tiếp từ thượng nguồn có thể dùng định dạng của nhà cung cấp

**application/json**

Schema:

```json
{}
```

## Schema definitions

### Response24B585A0A861_ExchangeIndex

`#/components/schemas/Response24B585A0A861_ExchangeIndex`

```json
{
  "type": "integer",
  "description": "Mã định danh cho một phân mảnh sàn giao dịch.",
  "example": 0
}
```

### Response24B585A0A861_FixedPointCount

`#/components/schemas/Response24B585A0A861_FixedPointCount`

```json
{
  "type": "string",
  "description": "Chuỗi số lượng hợp đồng dấu phẩy tĩnh (2 chữ số thập phân, ví dụ \"10.00\"; được gọi là \"fp\" trong tên trường). Yêu cầu chấp nhận 0-2 chữ số thập phân (ví dụ \"10\", \"10.0\", \"10.00\"); phản hồi luôn xuất 2 chữ số thập phân. Hỗ trợ giá trị hợp đồng lẻ (ví dụ \"2.50\"); độ chi tiết tối thiểu là 0.01 hợp đồng.",
  "example": "10.00"
}
```

### Response24B585A0A861_FixedPointDollars

`#/components/schemas/Response24B585A0A861_FixedPointDollars`

```json
{
  "type": "string",
  "description": "Chuỗi đô la Mỹ dấu phẩy tĩnh. Hầu hết trường yêu cầu chấp nhận 2-4 chữ số thập phân (ví dụ \"0.56\", \"0.5600\"); phản hồi xuất tối đa 6. Các khoảng báo giá hợp lệ cho một thị trường nhất định bị ràng buộc bởi cấu trúc mức giá của thị trường đó.",
  "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": "Xác định loại thị trường"
    },
    "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": "Tiêu đề rút gọn cho phía Có của thị trường này"
    },
    "no_sub_title": {
      "type": "string",
      "description": "Tiêu đề rút gọn cho phía NO của thị trường này"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "updated_time": {
      "type": "string",
      "format": "date-time",
      "description": "Thời điểm cập nhật siêu dữ liệu không phải giao dịch gần nhất."
    },
    "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": "Thời điểm thị trường này dự kiến hết hạn"
    },
    "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": "Thời điểm muộn nhất có thể để thị trường này hết hạn"
    },
    "settlement_timer_seconds": {
      "type": "integer",
      "description": "Khoảng thời gian sau khi xác định kết quả để thị trường thanh toán"
    },
    "status": {
      "type": "string",
      "enum": [
        "initialized",
        "inactive",
        "active",
        "closed",
        "determined",
        "disputed",
        "amended",
        "finalized"
      ],
      "description": "Trạng thái hiện tại của thị trường trong vòng đời của nó."
    },
    "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": "Dấu thời gian khi thị trường được thanh toán. Chỉ được điền cho các thị trường đã thanh toán"
    },
    "settlement_bounds_type": {
      "type": "string",
      "enum": [
        "default",
        "floor"
      ],
      "description": "Giới hạn quyết toán nào áp dụng cho thị trường này. default nghĩa là thị trường không có giới hạn quyết toán"
    },
    "settlement_floor_dollars": {
      "$ref": "#/components/schemas/Response24B585A0A861_FixedPointDollars"
    },
    "expiration_value": {
      "type": "string",
      "description": "Giá trị đã được xem xét cho việc quyết toán"
    },
    "occurrence_datetime": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "Ngày giờ được ghi nhận khi sự kiện cơ sở xảy ra, nếu có"
    },
    "fee_waiver_expiration_time": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "x-omitempty": true,
      "description": "Thời điểm miễn phí giao dịch của thị trường này hết hạn"
    },
    "early_close_condition": {
      "type": [
        "string",
        "null"
      ],
      "x-omitempty": true,
      "description": "Điều kiện để thị trường có thể đóng sớm",
      "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": "Loại giá thực hiện xác định cách giá thực hiện của thị trường được định nghĩa và đánh giá",
      "x-go-type-skip-optional-pointer": true
    },
    "floor_strike": {
      "type": [
        "number",
        "null"
      ],
      "format": "double",
      "x-omitempty": true,
      "description": "Giá trị hết hạn tối thiểu dẫn đến quyết toán YES"
    },
    "cap_strike": {
      "type": [
        "number",
        "null"
      ],
      "format": "double",
      "x-omitempty": true,
      "description": "Giá trị hết hạn tối đa dẫn đến quyết toán YES"
    },
    "functional_strike": {
      "type": [
        "string",
        "null"
      ],
      "x-omitempty": true,
      "description": "Ánh xạ từ giá trị hết hạn sang giá trị quyết toán"
    },
    "custom_strike": {
      "type": [
        "object",
        "null"
      ],
      "x-omitempty": true,
      "description": "Giá trị hết hạn cho mỗi mục tiêu dẫn đến quyết toán YES"
    },
    "rules_primary": {
      "type": "string",
      "description": "Mô tả bằng ngôn ngữ đơn giản về các điều khoản thị trường quan trọng nhất"
    },
    "rules_secondary": {
      "type": "string",
      "description": "Mô tả bằng ngôn ngữ đơn giản về các điều khoản thị trường thứ cấp"
    },
    "mve_collection_ticker": {
      "type": "string",
      "x-omitempty": true,
      "description": "Ticker của bộ sưu tập sự kiện đa biến",
      "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": "Cấu trúc mức giá cho thị trường này, xác định phạm vi giá và bước giá"
    },
    "price_ranges": {
      "type": "array",
      "description": "Phạm vi giá hợp lệ cho các lệnh trên thị trường này",
      "items": {
        "$ref": "#/components/schemas/Response24B585A0A861_PriceRange"
      }
    },
    "is_provisional": {
      "type": "boolean",
      "x-omitempty": true,
      "description": "Nếu là true, thị trường có thể bị xóa sau khi xác định nếu không có hoạt động nào trên đó",
      "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": "Mã định danh duy nhất cho sự kiện đã chọn",
      "x-go-type-skip-optional-pointer": true
    },
    "market_ticker": {
      "type": "string",
      "description": "Mã định danh duy nhất cho thị trường đã chọn",
      "x-go-type-skip-optional-pointer": true
    },
    "side": {
      "type": "string",
      "description": "Phía của thị trường đã chọn",
      "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": "Giá bắt đầu của khoảng này tính bằng đô la"
    },
    "end": {
      "type": "string",
      "description": "Giá kết thúc của khoảng này tính bằng đô la"
    },
    "step": {
      "type": "string",
      "description": "Bước giá/kích thước tick của khoảng này tính bằng đô la"
    }
  }
}
```
