Skip to main content

Get Pre-upgrade Transaction Log

Query transaction logs which occurred in the USDC Derivatives wallet before the account was upgraded to a Unified account.

  • UTA2.0:
    By category=linear, you can query USDC Perps transaction logs occurred during classic account By category=option, you can query Options transaction logs occurred during classic account

  • UTA1.0:
    By category=linear, you can query USDC Perps transaction logs occurred during classic account By category=option, you can query Options transaction logs occurred during classic account

You can get USDC Perpetual, Option records.

info

USDC Perpeual & Option support the recent 6 months data. Please download older data via GUI

HTTP Request

GET /v5/pre-upgrade/account/transaction-log

Request Parameters

ParameterRequiredTypeComments
categorytruestringProduct type linear, option
baseCoinfalsestringBaseCoin, uppercase only. e.g., BTC of BTCPERP
typefalsestringTypes of transaction logs
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)
limitfalseintegerLimit for data size per page. [1, 50]. Default: 20
cursorfalsestringCursor. Used for pagination

Response Parameters

ParameterTypeComments
listarrayObject
> symbolstringSymbol name
> categorystringProduct type
> sidestringSide. Buy,Sell,None
> transactionTimestringTransaction timestamp (ms)
> typestringType
> qtystringQuantity
> sizestringSize
> currencystringUSDC、USDT、BTC、ETH
> tradePricestringTrade price
> fundingstringFunding fee
  • Positive value means receiving funding fee
  • Negative value means deducting funding fee
> feestringTrading fee
  • Positive fee value means expense
  • Negative fee value means rebates
> cashFlowstringCash flow
> changestringChange
> cashBalancestringCash balance
> feeRatestring
  • When type=TRADE, then it is trading fee rate
  • When type=SETTLEMENT, it means funding fee rate. For side=Buy, feeRate=market fee rate; For side=Sell, feeRate= - market fee rate
> bonusChangestringThe change of bonus
> tradeIdstringTrade ID
> orderIdstringOrder ID
> orderLinkIdstringUser customised order ID
nextPageCursorstringCursor. Used for pagination

Request Example

GET /v5/pre-upgrade/account/transaction-log?category=option HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1686808288265
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json

Response Example

{
"retCode": 0,
"retMsg": "OK",
"result": {
"nextPageCursor": "21%3A0%2C21%3A0",
"list": [
{
"symbol": "ETH-14JUN23-1750-C",
"side": "Buy",
"funding": "",
"orderLinkId": "",
"orderId": "",
"fee": "0",
"change": "0",
"cashFlow": "0",
"transactionTime": "1686729604507",
"type": "DELIVERY",
"feeRate": "0",
"bonusChange": "",
"size": "0",
"qty": "0.5",
"cashBalance": "1001.1438885",
"currency": "USDC",
"category": "option",
"tradePrice": "1740.25036667",
"tradeId": ""
}
]
},
"retExtInfo": {},
"time": 1686809006792
}