跳到正文
注册

Earn

申购 Earn

将资金投入某个产品即开始生息:资金保持可用的产品从次日起,定期产品从第一天起。

POST/api/v1/earn/subscribe获取密钥
curl --request POST \
  --url "https://reirex.com/api/v1/earn/subscribe" \
  --header "GX-API-KEY: $GX_API_KEY" \
  --header "GX-API-TIMESTAMP: $TIMESTAMP" \
  --header "GX-API-SIGN: $SIGNATURE" \
  --header "Content-Type: application/json" \
  --data '{"productId":"USDT-flexible-0","amount":"1000"}'

201 Createdapplication/json

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

金额立即从余额中扣除。余额不足时返回 insufficient_balance,低于产品最低金额时返回 below_minimum。

请求体application/json

  • productIdstring必填

    产品,来自Earn 产品列表。

  • amountstring必填

    以产品货币计的金额,以十进制字符串表示。

响应

  • 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。