Skip to main content

Get Pre-upgrade Trade History

Get users' execution records which occurred before you upgraded the account to a Unified account, sorted by execTime in descending order

For now, it supports to query USDT perpetual, USDC perpetual, Inverse perpetual and futures, Option.

tip
  • Response items will have sorting issues When 'execTime' is the same, it is recommended to sort according to execId+OrderId+leavesQty. This issue is currently being optimized and will be released. If you want to receive real-time execution information, Use the websocket stream (recommended).
  • You may have multiple executions in a single order.
  • You can query by symbol, baseCoin, orderId and orderLinkId, and if you pass multiple params, the system will process them according to this priority: orderId > orderLinkId > symbol > baseCoin.

HTTP Request

GET /v5/pre-upgrade/execution/list

Request Parameters

ParameterRequiredTypeComments
categorytruestringProduct type linear, inverse, option
symbolfalsestringSymbol name
orderIdfalsestringOrder ID
orderLinkIdfalsestringUser customised order ID
baseCoinfalsestringBase coin. Used for option
startTimefalseintegerThe 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
endTimefalseintegerThe end timestamp (ms)
execTypefalsestringExecution type
limitfalseintegerLimit for data size per page. [1, 100]. Default: 50
cursorfalsestringCursor. Use the nextPageCursor token from the response to retrieve the next page of the result set

Response Parameters

ParameterTypeComments
categorystringProduct type
listarrayObject
> symbolstringSymbol name
> orderIdstringOrder ID
> orderLinkIdstringUser customized order ID
> sidestringSide. Buy,Sell
> orderPricestringOrder price
> orderQtystringOrder qty
> leavesQtystringThe remaining qty not executed
> orderTypestringOrder type. Market,Limit
> stopOrderTypestringStop order type. If the order is not stop order, any type is not returned
> execFeestringExecuted trading fee
> execIdstringExecution ID
> execPricestringExecution price
> execQtystringExecution qty
> execTypestringExecuted type
> execValuestringExecuted order value
> execTimestringExecuted timestamp(ms)
> isMakerbooleanIs maker order. true: maker, false: taker
> feeRatestringTrading fee rate
> tradeIvstringImplied volatility
> markIvstringImplied volatility of mark price
> markPricestringThe mark price of the symbol when executing
> indexPricestringThe index price of the symbol when executing
> underlyingPricestringThe underlying price of the symbol when executing
> blockTradeIdstringParadigm block trade ID
> closedSizestringClosed position size
nextPageCursorstringRefer to the cursor request parameter

Request Example

GET /v5/pre-upgrade/execution/list?category=linear&limit=1&execType=Funding&symbol=BTCUSDT HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1682580752432
X-BAPI-RECV-WINDOW: 5000

Response Example

{
"retCode": 0,
"retMsg": "OK",
"result": {
"list": [
{
"symbol": "BTCUSDT",
"orderId": "1682553600-BTCUSDT-592334-Sell",
"orderLinkId": "",
"side": "Sell",
"orderPrice": "0.00",
"orderQty": "0.000",
"leavesQty": "0.000",
"orderType": "UNKNOWN",
"stopOrderType": "UNKNOWN",
"execFee": "0.6364003",
"execId": "11f1c4ed-ff20-4d73-acb7-96e43a917f25",
"execPrice": "28399.90",
"execQty": "0.011",
"execType": "Funding",
"execValue": "312.3989",
"execTime": "1682553600000",
"isMaker": false,
"feeRate": "0.00203714",
"tradeIv": "",
"markIv": "",
"markPrice": "28399.90",
"indexPrice": "",
"underlyingPrice": "",
"blockTradeId": "",
"closedSize": "0.000"
}
],
"nextPageCursor": "page_token%3D96184191%26",
"category": "linear"
},
"retExtInfo": {},
"time": 1682580752717
}