Earn
申购 Earn
将资金投入某个产品即开始生息:资金保持可用的产品从次日起,定期产品从第一天起。
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持有的资产。
kindstringcash、flexible、fixed或staking。aprstring年化利率:
0.0420即年化 4.2%。termDaysinteger资金锁定的天数;资金随时可用的产品为
0。amountstring投入的金额。
earnedstring目前已赚取的收益;赎回后为累计支付的总额。
startedAtstring资金投入的时间。
endsAtstring | null定期产品的到期时间;其他产品为
null。redeemedAtstring | null资金返还的时间;生息期间为
null。

