跳至主要内容

查詢訂單資訊

信息
  • 需要身份驗證。每秒最多 10 次請求
  • 查詢訂單歷史記錄。API 金鑰需要具備 Earn(理財)權限。

HTTP 請求

GET/v5/earn/advance/order

請求參數

參數必填類型說明
categorytruestring產品類型,SmartLeverage
productIdfalsestring產品 ID
orderIdfalsestring訂單 ID
orderLinkIdfalsestring用戶自定義訂單 ID
startTimefalsestring開始時間(訂單創建時間),毫秒級 Unix 時間戳
endTimefalsestring結束時間,毫秒級 Unix 時間戳
limitfalseint每頁返回數量。預設:20,最大:20
cursorfalsestring分頁游標。使用上次響應中的 nextPageCursor

響應參數

參數類型說明
categorystring產品類別
nextPageCursorstring下一頁游標,為空表示無更多資料
listarray訂單列表
> orderIdstring訂單 ID
> orderLinkIdstring用戶自定義訂單 ID
> productIdstring產品 ID
> categorystring產品類別
> orderTypestringStake:申購。Redeem:提前贖回
> amountstring訂單金額
> createdTimestring創建時間,毫秒級 Unix 時間戳
> statusstringPending:訂單確認中,Success:訂單成功(已創建倉位),Settled:倉位已結算,Fail:訂單失敗
> durationstring產品期限,例如:1d, 2d, 3d
> accountTypestring帳戶類型
> settlementTimeint64結算時間,毫秒級 Unix 時間戳
> refundStatusstring退款狀態。僅在 status=Fail 時有效,Processing(處理中),Processed(已處理)
> investCoinstring投資幣種,例如:USDT
> underlyingAssetstring標的資產,例如:BTC, ETH
> directionstringLong(多頭),Short(空頭)
> leveragestring固定槓桿倍數
> breakevenPricestring損益平衡價格
> initialPricestring下單時的標的資產價格
> settlementPricestring結算價格。僅在 status=Settled 時有值
> pnlstring盈虧。僅在 status=Settled 時有值
> toAccountTypestring贖回後返回的帳戶。僅在 status=Settledstatus=Fail 時有值

請求示例

GET /v5/earn/advance/order?category=SmartLeverage&orderId=3e7d23fb-acc4-4853-9e32-ab0c0eb43985 HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1672280218882
X-BAPI-RECV-WINDOW: 5000

響應示例

{
"retCode": 0,
"retMsg": "",
"result": {
"category": "SmartLeverage",
"list": [
{
"orderId": "3e7d23fb-acc4-4853-9e32-ab0c0eb43985",
"orderLinkId": "usdt-earn-008",
"productId": "12999",
"category": "SmartLeverage",
"orderType": "Redeem",
"investCoin": "USDT",
"amount": "100",
"underlyingAsset": "BTC",
"direction": "Long",
"leverage": "200",
"breakevenPrice": "68622.69",
"initialPrice": "68403",
"settlementTime": "1775038327000",
"duration": "2d",
"createdTime": "1775038326000",
"status": "Settled",
"settlementPrice": "68566.72",
"pnl": "83.6876",
"refundStatus": "",
"accountType": "",
"toAccountType": "FUND"
}
],
"nextPageCursor": ""
},
"retExtInfo": {},
"time": 1775038381558
}