REST · Markets
市场数据全部为 public(无需认证)端点。
#GET /v1/markets
GET
/v1/marketsPublic市场列表(支持过滤、排序、分页)。
#Query parameters
| Name | Type | Description | Default |
|---|---|---|---|
| status | "ACTIVE" | "RESOLVED" | "CANCELLED" | "LOCKED" | "PENDING" | 按状态过滤。 | ACTIVE |
| category | "CRYPTO" | "SPORTS" | "POLITICS" | "ENTERTAINMENT" | "SCIENCE" | "FINANCE" | "OTHER" | 按分类过滤。 | — |
| q | string | 关键词搜索(针对问题、描述、标签)。 | — |
| sortBy | "VOLUME" | "LIQUIDITY" | "CREATED" | "TRENDING" | "ENDING" | 排序基准。 | CREATED |
| sortOrder | "ASC" | "DESC" | 排序方向。 | DESC |
| limit | number (1..100) | 单页返回的条目数。 | 20 |
| offset | number (≥0) | 跳过的条目数。 | 0 |
#Response 200
{
"markets": [
{
"id": "uuid",
"slug": "btc-100k-by-eoy",
"question": "BTC 会在 12 月 31 日前突破 10 万美元吗?",
"description": "...",
"category": "CRYPTO",
"type": "BINARY",
"status": "ACTIVE",
"trading_starts_at": "2026-01-01T00:00:00Z",
"trading_ends_at": "2026-12-31T23:59:59Z",
"resolution_date": null,
"winning_outcome_id": null,
"platform_fee": 200,
"spread": 0.01,
"image_url": "https://conviction-image.s3.amazonaws.com/...",
"tags": ["bitcoin", "macro"],
"views": 12345,
"verified": true,
"featured": false,
"created_at": "2026-01-15T10:00:00Z",
"updated_at": "2026-04-20T03:21:00Z",
"outcomes": [
{
"id": "uuid",
"name": "Yes",
"side": "YES",
"index": 0,
"probability": 0.42,
"condition_id": "0x...",
"position_id": "53...long-int..."
},
{
"id": "uuid",
"name": "No",
"side": "NO",
"index": 1,
"probability": 0.58,
"condition_id": "0x...",
"position_id": "98...long-int..."
}
]
}
],
"total": 347,
"limit": 20,
"offset": 0
}#示例
curl 'https://api.conviction.bet/v1/markets?status=ACTIVE&category=CRYPTO&sortBy=VOLUME&limit=10'#GET /v1/markets/{id}
GET
/v1/markets/\{id\}Public通过 UUID 查询单个市场。
#Path parameters
| Name | Type | Description | Default |
|---|---|---|---|
| id* | uuid | 市场 ID。 | — |
#Response 200
与上面 list 响应中的一个条目格式相同(单个对象)。
#Errors
404—— 市场不存在
#GET /v1/markets/slug/{slug}
GET
/v1/markets/slug/\{slug\}Public通过 URL 友好的 slug 查询单个市场。
#Path parameters
| Name | Type | Description | Default |
|---|---|---|---|
| slug* | string | 市场 slug。例如:"btc-100k-by-eoy" | — |
#Response 200
与上面相同。
#GET /v1/markets/{id}/orderbook
GET
/v1/markets/\{id\}/orderbookPublic特定结果的盘口。
#Path parameters
| Name | Type | Description | Default |
|---|---|---|---|
| id* | uuid | 市场 ID。 | — |
#Query parameters
| Name | Type | Description | Default |
|---|---|---|---|
| outcomeId* | string | 结果代币 ID。/v1/markets/{id} 响应中的 outcomes[].id | — |
#Response 200
{
"outcome_id": "uuid",
"outcome_side": "YES",
"bids": [
{ "price": "0.42", "shares": "1234.5" },
{ "price": "0.41", "shares": "899.0" }
],
"asks": [
{ "price": "0.45", "shares": "567.2" },
{ "price": "0.46", "shares": "880.1" }
]
}| 字段 | 含义 |
|---|---|
bids | 买入挂单,价格降序(最高者在前) |
asks | 卖出挂单,价格升序(最低者在前) |
price | 0..1 的 string |
shares | 用于 UI 显示的 float string |
#GET /v1/markets/slug/{slug}/orderbook
GET
/v1/markets/slug/\{slug\}/orderbookPublic通过 slug 查询盘口。响应格式与上面相同。
#GET /v1/markets/{id}/prices-history
GET
/v1/markets/\{id\}/prices-historyPublic结果的时序价格(用于蜡烛图 / 折线图)。
#Query parameters
| Name | Type | Description | Default |
|---|---|---|---|
| outcomeId* | string | 结果 ID。 | — |
| startTs | unix seconds | 开始时刻。 | — |
| endTs | unix seconds | 结束时刻。 | — |
| fidelity | minutes (1, 5, 15, 60, ...) | 分桶大小。 | 1 |
#Response 200
{
"history": [
{ "t": 1740000000, "p": 0.41 },
{ "t": 1740000060, "p": 0.42 },
{ "t": 1740000120, "p": 0.43 }
]
}| 字段 | 含义 |
|---|---|
t | unix seconds |
p | 该分桶的最后成交价格(0..1 float) |
#GET /v1/markets/slug/{slug}/prices-history
GET
/v1/markets/slug/\{slug\}/prices-historyPublic通过 slug 查询时序。响应格式相同。
#下一步
- Documentation → 核心概念 —— 深入了解市场结构与生命周期
- 分页 —— list 端点通用约定
本页面是否有帮助?