Skip to content

收益奖励历史接口文档 ​

接口信息 ​

项目说明
接口路径/api/v1/dex/earn/rewards-history
请求方法GET
代理路径/serverproxy/api/v1/dex/earn/rewards-history
后端服务https://api.dev.topo.club
认证方式Authorization: ApiKey <key>

请求参数 ​

Query 参数 ​

参数名类型必填说明
network_idstring是网络标识,前端自动注入。topo--164 或 aptos--2
wallet_addressstring是用户钱包地址
pagenumber否页码,从 1 开始,默认 1
page_sizenumber否每页数量,默认 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_historyarray奖励历史列表
rewards_history[].amountstring奖励金额(原始值,未除精度)
rewards_history[].tokenstring奖励代币符号
rewards_history[].coinTypestring奖励代币 Coin Type
rewards_history[].decimalsnumber代币精度
rewards_history[].userstring用户地址
rewards_history[].timestampnumber领取时间(秒)
totalnumber总记录数
pagenumber当前页码
page_sizenumber每页数量

前端调用示例 ​

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