GET通过 ID 获取市场

通过 UUID 检索特定预测市场的详细信息。返回的数据与通过 Slug 获取市场相同,但接受 UUID 而非 slug。包含结果、顶级交易者、评论和解决详情。

请求

GET /v1/markets/:id

路径参数

参数类型必填描述
idstring (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 数组的具体内容。每条评论包含 iduserIdcontentparentIdlikesCountisLikedreplyCountcreatedAt,以及嵌套的 user 对象(含 idusernameprofileImageUrl)。

响应字段

字段类型描述
idstring唯一市场标识符 (UUID)
slugstringURL 友好的市场标识符
questionstring市场问题
descriptionstring详细市场描述和解决标准
categorystring市场分类
typestringBINARYMULTI
statusstring当前市场状态
spreadstring市场价差
platformFeestring平台费率
totalVolumestringUSDC 总交易量
totalLiquiditystringUSDC 总流动性
winningOutcomeIdstring | null解决后的获胜结果 ID
winningOutcomeobject | null解决后的完整获胜结果对象
outcomesarray可能结果列表及其概率
outcomes[].idstring唯一结果标识符
outcomes[].marketIdstring父市场 ID
outcomes[].probabilitystring当前概率(0-1)
outcomes[].conditionIdstring链上条件标识符
outcomes[].positionIdstring链上持仓标识符
topTradersarray按交易量排名的顶级交易者
topTraders[].usernamestring交易者用户名
topTraders[].volumestring交易者的 USDC 总交易量
commentsarray市场评论(详见上方说明)

错误

状态码描述
404未找到市场

示例

curl https://api.conviction.bet/v1/markets/550e8400-e29b-41d4-a716-446655440000