Skip to main content

Get Spread Trade History

info
  • In self-trade cases, both the maker and taker single-leg trades will be returned in the same request.
  • Single leg executions can also be found with "execType"=FutureSpread via Get Trade History

HTTP Request

GET /v5/spread/execution/list

Request Parameters

ParameterRequiredTypeComments
symbolfalsestringSpread combination symbol name
orderIdfalsestringSpread combination order ID
orderLinkIdfalsestringUser customised order ID
startTimefalselongThe start timestamp (ms)
  • startTime and endTime are not passed, return 7 days by default
  • Only startTime is passed, return range between startTime and startTime+7 days
  • Only endTime is passed, return range between endTime-7 days and endTime
  • If both are passed, the rule is endTime - startTime <= 7 days
endTimefalselongThe end timestamp (ms)
limitfalseintegerLimit for parent order data size per page. [1, 50]. Default: 20
cursorfalsestringCursor. Use the nextPageCursor token from the response to retrieve the next page of the result set

Response Parameters

ParameterTypeComments
listarray<object>Trade info
> symbolstringSpread combination symbol name
> orderLinkIdstringUser customised order ID
> sidestringSide, Buy, Sell
> orderIdstringSpread combination order ID
> execPricestringCombo Exec price
> execTimestringCombo exec timestamp (ms)
> execTypestringCombo exec type, Trade
> execQtystringCombo exec qty
> execIdstringCombo exec ID
> legsarray<object>Legs execution info
>> symbolstringLeg symbol name
>> sidestringLeg order side, Buy, Sell
>> execPricestringLeg exec price
>> execTimestringLeg exec timestamp (ms)
>> execValuestringLeg exec value
>> execTypestringLeg exec type
>> categorystringLeg category, linear, spot
>> execQtystringLeg exec qty
>> execFeestringLeg exec fee
>> execIdstringLeg exec ID
nextPageCursorstringRefer to the cursor request parameter

Request Example

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

Response Example

{
"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
}