GET通过 ID 获取市场
通过 UUID 检索特定预测市场的详细信息。返回的数据与通过 Slug 获取市场相同,但接受 UUID 而非 slug。包含结果、顶级交易者、评论和解决详情。
请求
GET /v1/markets/:id
路径参数
| 参数 | 类型 | 必填 | 描述 |
|---|
id | string (UUID) | 是 | 唯一市场标识符(例如 550e8400-e29b-41d4-a716-446655440000) |
响应
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"slug": "will-btc-hit-100k",
"question": "Will BTC hit $100k by June 2026?",
"description": "Resolves YES if Bitcoin (BTC) price reaches $100,000 USD on any major exchange before June 1, 2026.",
"imageUrl": "https://...",
"category": "CRYPTO",
"type": "BINARY",
"status": "ACTIVE",
"spread": "0.02",
"platformFee": "0.02",
"totalVolume": "125000.00",
"totalLiquidity": "45000.00",
"views": 3200,
"featured": true,
"verified": true,
"tags": ["bitcoin", "crypto"],
"tradingStartsAt": "2026-01-15T00:00:00Z",
"tradingEndsAt": "2026-06-01T00:00:00Z",
"resolutionDate": "2026-06-01T00:00:00Z",
"resolvedAt": null,
"resolvedBy": null,
"resolutionSource": null,
"resolutionNote": null,
"winningOutcomeId": null,
"winningOutcome": null,
"createdAt": "2026-01-15T00:00:00Z",
"updatedAt": "2026-03-10T12:00:00Z",
"outcomes": [
{
"id": "outcome-uuid-1",
"marketId": "550e8400-e29b-41d4-a716-446655440000",
"name": "Yes",
"index": 0,
"side": "YES",
"description": "Bitcoin reaches $100k",
"probability": "0.67",
"questionId": "question-uuid-1",
"conditionId": "condition-uuid-1",
"positionId": "position-uuid-1",
"createdAt": "2026-01-15T00:00:00Z",
"updatedAt": "2026-03-10T12:00:00Z"
},
{
"id": "outcome-uuid-2",
"marketId": "550e8400-e29b-41d4-a716-446655440000",
"name": "No",
"index": 1,
"side": "NO",
"description": "Bitcoin does not reach $100k",
"probability": "0.33",
"questionId": "question-uuid-1",
"conditionId": "condition-uuid-1",
"positionId": "position-uuid-2",
"createdAt": "2026-01-15T00:00:00Z",
"updatedAt": "2026-03-10T12:00:00Z"
}
],
"topTraders": [
{
"username": "alice",
"profileImageUrl": "https://...",
"volume": "50000.00"
},
{
"username": "bob",
"profileImageUrl": "https://...",
"volume": "30000.00"
}
],
"comments": []
}
注意: 上述示例中省略了 comments 数组的具体内容。每条评论包含 id、userId、content、parentId、likesCount、isLiked、replyCount、createdAt,以及嵌套的 user 对象(含 id、username、profileImageUrl)。
响应字段
| 字段 | 类型 | 描述 |
|---|
id | string | 唯一市场标识符 (UUID) |
slug | string | URL 友好的市场标识符 |
question | string | 市场问题 |
description | string | 详细市场描述和解决标准 |
category | string | 市场分类 |
type | string | BINARY 或 MULTI |
status | string | 当前市场状态 |
spread | string | 市场价差 |
platformFee | string | 平台费率 |
totalVolume | string | USDC 总交易量 |
totalLiquidity | string | USDC 总流动性 |
winningOutcomeId | string | null | 解决后的获胜结果 ID |
winningOutcome | object | null | 解决后的完整获胜结果对象 |
outcomes | array | 可能结果列表及其概率 |
outcomes[].id | string | 唯一结果标识符 |
outcomes[].marketId | string | 父市场 ID |
outcomes[].probability | string | 当前概率(0-1) |
outcomes[].conditionId | string | 链上条件标识符 |
outcomes[].positionId | string | 链上持仓标识符 |
topTraders | array | 按交易量排名的顶级交易者 |
topTraders[].username | string | 交易者用户名 |
topTraders[].volume | string | 交易者的 USDC 总交易量 |
comments | array | 市场评论(详见上方说明) |
错误
示例
curl https://api.conviction.bet/v1/markets/550e8400-e29b-41d4-a716-446655440000