查詢價差成交歷史
信息
- 在自成交場景下, 單腿成交的maker和taker的兩筆成交都會返回, 他們的execId一樣
- 單腿的成交信息也會出現查詢成交歷史接口中, 標記是"execType"=
FutureSpread
HTTP請求
GET /v5/spread/execution/list
請求參數
參數 | 是否必需 | 類型 | 說明 |
---|---|---|---|
symbol | false | string | 價差產品名稱 |
orderId | false | string | 價差訂單ID |
orderLinkId | false | string | 用戶自定義ID |
startTime | false | long | 開始時間戳 (毫秒)
|
endTime | false | long | 結束時間戳 (毫秒) |
limit | false | integer | 每頁數量限制. [1 , 50 ]. 默認: 20 |
cursor | false | string | 游標,用於翻頁 |
響應參數
參數 | 類型 | 說明 |
---|---|---|
list | array<object> | 成交信息 |
> symbol | string | 價差產品名稱 |
> orderLinkId | string | 用戶自定義ID |
> side | string | 訂單方向, Buy , Sell |
> orderId | string | 價差訂單ID |
> execPrice | string | 價差訂單成交價格 |
> execTime | string | 價差訂單成交時間(毫秒) |
> execType | string | 價差訂單成交類型, Trade |
> execQty | string | 價差訂單成交數量 |
> execId | string | 價差訂單成交ID |
> legs | array<object> | 單腿成交信息 |
>> symbol | string | 單腿合約名稱 |
>> side | string | 單腿訂單方向 Buy , Sell |
>> execPrice | string | 單腿成交價格 |
>> execTime | string | 單腿成交時間 (毫秒) |
>> execValue | string | 單腿成交價值 |
>> execType | string | 單腿成交類型 |
>> category | string | 單腿合約類型 linear : 合約, spot : 現貨 |
>> execQty | string | 單腿成交數量 |
>> execFee | string | 單腿交易手續費用 |
>> execId | string | 單腿成交ID |
nextPageCursor | string | 游標,用於翻頁 |
請求示例
GET /v5/spread/execution/list?orderId=5e010c35-2b44-4f03-8081-8fa31fb73376 HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1744105738529
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json
響應示例
{
"retCode": 0,
"retMsg": "Success",
"result": {
"nextPageCursor": "82c82077-0caa-5304-894d-58a50a342bd7%3A1744104992219%2C82c82077-0caa-5304-894d-58a50a342bd7%3A1744104992219",
"list": [
{
"symbol": "SOLUSDT_SOL/USDT",
"orderLinkId": "",
"side": "Buy",
"orderId": "5e010c35-2b44-4f03-8081-8fa31fb73376",
"execPrice": "21",
"legs": [
{
"symbol": "SOLUSDT",
"side": "Buy",
"execPrice": "124.1",
"execTime": "1744104992224",
"execValue": "248.2",
"execType": "FutureSpread",
"category": "linear",
"execQty": "2",
"execFee": "0.039712",
"execId": "99a18f80-d3b5-4c6f-a1f1-8c5870e3f3bc"
},
{
"symbol": "SOLUSDT",
"side": "Sell",
"execPrice": "103.1152",
"execTime": "1744104992224",
"execValue": "206.2304",
"execType": "FutureSpread",
"category": "spot",
"execQty": "2",
"execFee": "0.06186912",
"execId": "2110000000061481958"
}
],
"execTime": "1744104992220",
"execType": "Trade",
"execQty": "2",
"execId": "82c82077-0caa-5304-894d-58a50a342bd7"
}
]
},
"retExtInfo": {},
"time": 1744105105169
}