跳到正文
注册

Earn

赎回 Earn

取回持仓中的资金,连同尚未支付的全部收益。

POST/api/v1/earn/redeem获取密钥
curl --request POST \
  --url "https://reirex.com/api/v1/earn/redeem" \
  --header "GX-API-KEY: $GX_API_KEY" \
  --header "GX-API-TIMESTAMP: $TIMESTAMP" \
  --header "GX-API-SIGN: $SIGNATURE" \
  --header "Content-Type: application/json" \
  --data '{"positionId":381}'

200 OKapplication/json

{
  "positionId": 381,
  "productId": "USDT-flexible-0",
  "currency": "USDT",
  "kind": "flexible",
  "apr": "0.0420",
  "termDays": 0,
  "amount": "1000.00000000",
  "earned": "3.45205479",
  "startedAt": "2026-09-14T10:02:44.120Z",
  "endsAt": null,
  "redeemedAt": "2026-10-14T16:14:15.412Z"
}

定期产品会在到期日自动返还,在此之前返回 locked。

请求体application/json

响应

  • positionIdinteger

    我们为持仓分配的 id。

  • productIdstring

    所属产品。

  • currencystring

    持有的资产。

  • kindstring

    cash、flexible、fixed 或 staking。

  • aprstring

    年化利率:0.0420 即年化 4.2%。

  • termDaysinteger

    资金锁定的天数;资金随时可用的产品为 0。

  • amountstring

    投入的金额。

  • earnedstring

    目前已赚取的收益;赎回后为累计支付的总额。

  • startedAtstring

    资金投入的时间。

  • endsAtstring | null

    定期产品的到期时间;其他产品为 null。

  • redeemedAtstring | null

    资金返还的时间;生息期间为 null。