查詢收益歷史
信息
API key需要"理財""權限
HTTP 請求
GET /v5/earn/yield
請求參數
參數名稱 | 必填 | 類型 | 說明 |
---|---|---|---|
category | true | string | FlexibleSaving |
productId | false | string | 產品 ID |
startTime | false | integer | 開始時間戳 (ms)
|
endTime | false | integer | 結束時間戳 (ms) |
limit | false | integer | 每頁數據大小限制. 範圍:[1, 100]。默認值:50 |
cursor | false | string | 游標,使用返回的 nextPageCursor 查詢下一頁的數據。 |
響應參數
參數名稱 | 類型 | 說明 |
---|---|---|
nextPageCursor | string | 游標,用於翻頁 |
list | array | |
> productId | string | 產品 ID |
> coin | string | 幣種名稱:"BTC", "ETH" |
> id | string | 唯一鍵(僅在同一用戶下保證唯一) |
> amount | string | 收益金額。例如:10 |
> yieldType | string | 收益類型:Normal ,Bonus (靈活僅支援 Normal ) |
> distributionMode | string | 分配類型:Auto ,Manual ,Reinvest
|
>effectiveStakingAmount | string | 有效持倉金額,例如:1000.00 |
> orderId | string | 贖回訂單 UUID,对于FlexibleSaving ,僅當 distribution_mode 為 Manual 時返回訂單 ID |
> status | string | 訂單狀態:Pending ,Success ,Fail |
> createdAt | string | 訂單創建時間 (ms),例如:1684738540561 |
請求示例
- HTTP
- Python
- Node.js
GET /v5/earn/yield?category=FlexibleSaving HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1739937044221
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json
響應示例
{
"retCode": 0,
"retMsg": "",
"result": {
"yield": [
{
"productId": "428",
"coin": "USDT",
"id": "1002096",
"amount": "0.0608",
"yieldType": "Normal",
"distributionMode": "Manual",
"effectiveStakingAmount": "1000",
"orderId": "05a7012d-c4d6-493a-8c6b-023a1038944a",
"status": "Success",
"createdAt": "1759993805000"
}
],
"nextPageCursor": ""
},
"retExtInfo": {},
"time": 1759993815641
}