跳到主要内容

赛季列表

返回所有赛季的元信息,包含代币池大小与状态。

GET /points/seasons

无需认证。

响应

{
"success": true,
"data": [
{
"season_id": "a1b2c3d4-...",
"season_no": 1,
"label": "Season 1",
"start_epoch": 1,
"end_epoch": 4,
"user_pool_tokens": 35000000,
"mm_pool_tokens": 20000000,
"status": "completed",
"snapshot_at": "2026-02-01T00:00:00Z",
"snapshot_taken_at": "2026-02-01T00:05:32Z",
"distribution_at": "2026-02-03T00:00:00Z"
},
{
"season_id": "b2c3d4e5-...",
"season_no": 2,
"label": "Season 2",
"start_epoch": 5,
"end_epoch": 8,
"user_pool_tokens": 25000000,
"mm_pool_tokens": 16000000,
"status": "active",
"snapshot_at": null,
"snapshot_taken_at": null,
"distribution_at": null
}
],
"error": null,
"timestamp": 1745280000
}

响应字段

字段类型说明
season_idstring赛季 UUID
season_noint赛季编号
labelstring可读标签
start_epochint赛季首个 Epoch 编号
end_epochint赛季末个 Epoch 编号
user_pool_tokensint普通用户代币池
mm_pool_tokensint做市商代币池
statusstring赛季状态(见下表)
snapshot_atstring | null计划快照时间(ISO 8601)
snapshot_taken_atstring | null实际快照执行时间
distribution_atstring | null计划分配时间

赛季状态

含义
pending待开始
active进行中
completed已完成快照并写入分配记录

快照 worker 在一个事务内将赛季从 active 直接置为 completed——不存在中间的 snapshot / distributing 状态。

代码示例

Python

import requests

BASE_URL = "https://api.prex.world/api/v1"

resp = requests.get(f"{BASE_URL}/points/seasons")
seasons = resp.json()["data"]

for s in seasons:
print(f"Season {s['season_no']} [{s['status']}]: Epoch {s['start_epoch']}{s['end_epoch']}, 用户池={s['user_pool_tokens']:,}")