赛季代币分配详情
返回当前登录用户在指定赛季的代币分配记录。
GET /points/distribution/:season_id
Authorization: Bearer <token>
Path 参数
| 参数 | 类型 | 说明 |
|---|---|---|
season_id | UUID | 赛季 ID(从 GET /points/seasons 获取) |
响应
data 载荷为数组。用户最多有两条记录:user 池和 mm(做市商)池各一条。赛季尚未快照时返回空数组 []。
{
"success": true,
"data": [
{
"id": "f1e2d3c4-...",
"season_id": "a1b2c3d4-...",
"user_address": "0xabcd...1234",
"pool_type": "user",
"weighted_points": "48500.00",
"share_pct": "0.000023000000",
"token_amount": "805.00",
"claim_status": "pending",
"claim_deadline": "2026-03-05T00:00:00Z",
"claim_nonce": 1,
"claimed_at": null,
"claim_tx_hash": null,
"created_at": "2026-02-03T00:00:00Z"
}
],
"error": null,
"timestamp": 1745280000
}
数组按
pool_type排序,mm排在user之前。
响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 分配记录 UUID,用于领取接口 |
season_id | string | 赛季 UUID |
user_address | string | 用户钱包地址 |
pool_type | string | user(普通用户池)或 mm(做市商池) |
weighted_points | Decimal | user 池:TP×0.65 + PP×0.20 + HP×0.05 + RP×0.10 在本赛季各 Epoch 上求和;mm 池:质量分总和 |
share_pct | Decimal | 占总池的分配比例(精度 12 位小数) |
token_amount | Decimal | 分配代币数量(人类可读,非 wei) |
claim_status | string | pending / claimed / expired —— claimed 与 expired 为预留状态:当前无代码路径执行(TGE 前,分配合约尚未部署) |
claim_deadline | string | 领取截止时间(快照后 30 天,ISO 8601) |
claim_nonce | int | EIP-712 签名用的 nonce |
claimed_at | string | null | 链上领取时间 |
claim_tx_hash | string | null | 链上领取交易哈希 |
代币分配公式
weighted_points = TP × 0.65 + PP × 0.20 + HP × 0.05 + RP × 0.10 (summed over the season's epochs)
share_pct = user_weighted_points / Σ(all_users_weighted_points)
token_amount = season_pool_tokens × share_pct
MM 池以各做市商的质量分总和替代 weighted_points。earn_level_weight 不参与代币分配——它只决定 Earn 申购配额。
代码示例
Python
import requests
BASE_URL = "https://api.prex.world/api/v1"
JWT_TOKEN = "your_jwt_token"
SEASON_ID = "a1b2c3d4-..."
resp = requests.get(
f"{BASE_URL}/points/distribution/{SEASON_ID}",
headers={"Authorization": f"Bearer {JWT_TOKEN}"},
)
records = resp.json()["data"]
for rec in records:
print(f"池类型: {rec['pool_type']},代币: {rec['token_amount']},状态: {rec['claim_status']}")
if rec["claim_status"] == "pending":
print(f" 截止: {rec['claim_deadline']},distribution_id: {rec['id']}")