Appearance
收益奖励历史接口文档
接口信息
| 项目 | 说明 |
|---|---|
| 接口路径 | /api/v1/dex/earn/rewards-history |
| 请求方法 | GET |
| 代理路径 | /serverproxy/api/v1/dex/earn/rewards-history |
| 后端服务 | https://api.dev.topo.club |
| 认证方式 | Authorization: ApiKey <key> |
请求参数
Query 参数
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| network_id | string | 是 | 网络标识,前端自动注入。topo--164 或 aptos--2 |
| wallet_address | string | 是 | 用户钱包地址 |
| page | number | 否 | 页码,从 1 开始,默认 1 |
| page_size | number | 否 | 每页数量,默认 20 |
请求示例
bash
GET /serverproxy/api/v1/dex/earn/rewards-history?network_id=topo--164&wallet_address=0x4c25640a...&page=1&page_size=20
Authorization: ApiKey <key>响应数据结构
json
{
"code": 0,
"message": "Success",
"data": {
"rewards_history": [
{
"amount": "1000000000",
"token": "APT",
"coinType": "0x1::aptos_coin::AptosCoin",
"decimals": 8,
"user": "0x4c25640a...",
"timestamp": 1745380000
}
],
"total": 42,
"page": 1,
"page_size": 20
},
"timestamp": 1745380000
}响应字段说明
| 字段名 | 类型 | 说明 |
|---|---|---|
| rewards_history | array | 奖励历史列表 |
| rewards_history[].amount | string | 奖励金额(原始值,未除精度) |
| rewards_history[].token | string | 奖励代币符号 |
| rewards_history[].coinType | string | 奖励代币 Coin Type |
| rewards_history[].decimals | number | 代币精度 |
| rewards_history[].user | string | 用户地址 |
| rewards_history[].timestamp | number | 领取时间(秒) |
| total | number | 总记录数 |
| page | number | 当前页码 |
| page_size | number | 每页数量 |
前端调用示例
typescript
import { fetchDexRewardsHistory } from '@/lib/request/api'
const result = await fetchDexRewardsHistory({
wallet_address: '0x4c25640a...',
page: 1,
page_size: 20,
})
const { rewards_history, total } = result.data