跳至主要内容

獲取即時報價

獲取即時報價資訊。每秒最多 50 次請求

信息
  • 獲取使用者發送或接收的報價資訊,從 rfq-engine 查詢,無延遲
  • 同時傳遞 quoteId 和 quoteLinkId 時,以 quoteId 為準,優先順序:quoteId > quoteLinkId > rfqId
  • 根據報價的創建時間倒序排列
  • 返回所有非最終報價
  • 在極端市場波動期間, 此介面可能會出現延遲增加或資料傳遞暫時延遲的情況

HTTP 請求

GET /v5/rfq/quote-realtime

請求參數

參數是否必需類型說明
rfqIdfalsestring詢價單 ID
quoteIdfalsestring報價單 ID
quoteLinkIdfalsestring報價單自定義 ID;當 traderType 為 request 時,此字段無效
traderTypefalsestring交易者類型,quoterequest,默認為 quote
  • Request:詢價方,查詢自己接收到的報價
  • Quote:報價方,查詢自己發布的報價

響應參數

參數類型說明
listArray報價數據陣列
> rfqIdstring詢價單 ID
> rfqLinkIdstring自定義詢價單 ID,客戶敏感資訊不會公開,僅返回給報價方
> quoteIdstring報價單 ID
> quoteLinkIdstring自定義報價單 ID,客戶敏感資訊不會公開,僅返回給詢價方
> expiresAtstring詢價單的過期時間,Unix 時間戳的毫秒格式
> deskCodestring詢價方的唯一識別代碼,若詢價時設置匿名為 true 則不可見
>> statusstring詢價單狀態:ActivePendingFillCanceledFilledExpiredFailed
>> execQuoteSidestring執行報價方向,BuySell 。當報價方向為 Buy 時,對於 maker,執行方向與 legs 中的方向一致,對於 taker 則相反;反之亦然
>> createdAtstring交易創建的時間(毫秒),例如 1650380963
>> updatedAtstring交易更新的時間(毫秒),例如 1650380964
>> quoteBuyListarray of objects報價 Buy 方向
>>> categorystring產品類型:spotlinearoption
>>> symbolstring唯一的交易品種 ID
>>> pricestring報價價格
>>> qtystring交易品種的訂單數量
>> quoteSellListarray of objects報價 Sell 方向
>>> categorystring產品類型:spotlinearoption
>>> symbolstring唯一的交易品種 ID
>>> pricestring報價價格
>>> qtystring交易品種的訂單數量

請求示例

GET /v5/rfq/quote-realtime HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1676430842094
X-BAPI-RECV-WINDOW: 5000
X-BAPI-SIGN: XXXXXX

響應示例

{
"retCode": 0,
"retMsg": "OK",
"result": {
"list": [
{
"rfqLinkId": "",
"rfqId": "175740578143743543930777169307022",
"quoteId": "1757405933130044334361923221559805",
"quoteLinkId": "",
"expiresAt": "1757405993126",
"status": "Active",
"deskCode": "test0904",
"execQuoteSide": "",
"quoteBuyList": [
{
"category": "linear",
"symbol": "BTCUSDT",
"price": "113790",
"qty": "0.5"
}
],
"quoteSellList": [
{
"category": "linear",
"symbol": "BTCUSDT",
"price": "110500",
"qty": "0.5"
}
],
"createdAt": "1757405933126",
"updatedAt": "1757405933126"
}
]
},
"retExtInfo": {},
"time": 1757405978376
}