How to get trade history from Bybit

This page explains how to get trade history from Bybit.

 

Contents

1.Important Notes
2.How to get files from Standard account
 2-1.SPOT Trades history
 2-2.Derivatives Trades history ( "USDT Perpetual","Inverse Perpetual"and"Inverse Futures")
3.How to get files from Unified trading account(UTA)
 3-1.Spot trades history
 3‐2.Derivatives Trades history ( "USDT Perpetual")
 3‐3.Derivatives Trades history ( "Inverse Perpetual"and"Inverse Futures")
 3‐4.Derivatives Trades history(USDC Options)
4.Important note on Bybit's Derivatives Trade history
5.How to get Bybit Funding Account(ex. ByFi Center)

 

1. Important Notes

1-1. Trade types that can be obtained by API and exchange file.

  • Please be sure to check here for more details about our support for Bybit.
  • "To confirm" transactions・・"To confirm transactions" lack sufficient details in the file to identify the transaction specifics. Refer here (Japanese only) for guidance on handling such transactions.

1-2. Export

  • You can export up to two years of data while the maximum data can be exported each time is six months for Spot & Earn and three months for Derivatives. 
  • You can export up to 5 times per day.
  • Each download URL will only be kept for 7 days.
  • Up to 10,000 records can be exported each time; please modify the date range or contact the Bybit customer support if the status shows "Limit Exceeded"
  • The export will be processed within 5 -10 minutes. You can download the file once the export is complete.

For example, you want to export Spot order history of Year 2022. You will need to export two times by manually filter the export range from Jan to June, and July to December.

 

2. How to get the files from Standard account

2-1.Spot trades history

1. After logging in, click "Orders" from the menu bar and click "Spot Order"
mceclip0.png

2. Under Spot Account, select "Trade History", then click "Export".
mceclip1.png
*Please note that the "Order History" file is not supported by cryptact, so please make sure you have selected "Trade History".

3. Select the date range and click "Export Now". When the file is ready, you can download it by clicking "Download" in "My Exports" section.
mceclip3.png
* Please download all trade history. If they are divided into multiple files, please upload all files in the order of the oldest period to the newest.

 

2-2.Derivatives Trades history ( "USDT Perpetual","Inverse Perpetual"and"Inverse Futures")

1.After logging into Bybit,click on "Orders" → "Derivatives Orders.
Bybit_Deriv_I.png

2.Under "Derivatives Account", click on "Closed P&L""Export".
* The exported file will contain "Inverse Perpetual", "USDT Perpetual", and "Inverse Futures".
Bybit_Deriv_II.png

3.Select the date range, then ② Click "Export Now", ③ Once the file is ready for download, in the "My Exports" section, the "Download" button becomes active.
Bybit_Deriv_III.png
* Please download all trade history. If they are divided into multiple files, please upload all files in the order of the oldest period to the newest.

4. On the upload page, upload the file to "Bybit/Closed P&L history(USDT and Inverse)".
Bybit_Deriv_IV.png

 

3. How to get files from Unified trading account(UTA)

3‐1.SPOT Trades history

1. After logging in, click "Orders" from the menu bar and click "Unified Trading Order".


2. Click on "Spot orders" under Unified Trading Account, select "Trade History*", then click "Export".
*Be sure to select "Trade History". The "Order History" file is not supported.


3.  Select the date range and click "Export Now". When the file is ready, you can download it by clicking "Download" in "My Exports" section.

* Please download all trade history. If they are divided into multiple files, please upload all files in the order of the oldest period to the newest.

3‐2.Derivatives Trades history("USDT Perpetual")

1. After logging in, click "Orders" from the menu bar and click "Unified Trading Order".


2.Click on "USDT Perpetual" under Unified Trading Account, select "Closed P&L*", then click "Export".
*Be sure to select "Closed P&L".


3.  Select the date range and click "Export Now". When the file is ready, you can download it by clicking "Download" in "My Exports" section.


 

3‐3.Derivatives Trades history("Inverse Perpetual"and"Inverse Futures")

1. After logging in, click "Orders" from the menu bar and click "Invers Derivatives Order".


2.Click on "Closed P&L" under Inverse Derivatives then click "Export".
*Be sure to select "Closed P&L".


3.  Select the date range and click "Export Now". When the file is ready, you can download it by clicking "Download" in "My Exports" section.

*Although there is an on-screen notice that "*Exported data includes historical records of USDT perpetual , Inverse perpetual and Inverse Futures." the file we downloaded as of 11/1/2023 did not include historical records for USDT indefinite contracts.

3‐4.Derivatives Trades history("USDC Options")

1. After logging in, click "Orders" from the menu bar and click "Unified Trading Order".


2.Click on "USDC Options" under United Trading Account then select"Trade Cashflow" and click on "Export".


3.  Select the date range and click "Export Now". When the file is ready, you can download it by clicking "Download" in "My Exports" section.


4.On the upload page, upload the file to "Bybit/USDC OpUSDC Options Trade Cashflow


4. Important note on Bybit's Derivatives Trade history

4‐1.Calculation Methods for Derivative Transactions

  • P&L Calculation for Derivatives: profit and loss calculations are based on the contract’s collateral. If the collateral has increased at the time of settlement it is considered a profit, and if decreased it is considered a loss. Although profit and loss calculation itself is possible, Cryptact is not able to display the detail of the transaction that generated the p&l (e.g. profit generated by ETH leveraged transactions). Please check the trade history from the exchange separately.
  • The funding fees for derivatives trades get reflected when the positions are closed.

 

4‐2.Duplication of history

Although the exact date is unknown, the above download functionality was released by the exchange sometime between Dec-2021 to Jan-2022. Before that time, the exchange provided request-based trade history files and you were able to upload trade history to Cryptact using these files.

If you have previously uploaded trade history via these request-based files, you may end up with duplicate trades depending on the date range you use while downloading the files. Please check for any duplicate trades and delete them if you find any.

Once the upload boxes process files downloaded using the above steps, they can no longer process the request-based files.

If you would like to upload the request-based files, please use the below upload box.

mceclip8.png

 

5. How to get Bybit Funding Account file (ex. ByFi Center)

5-1.Standard account

1. After logging in, click "Assets" from the menu bar and click "".


2.In "Funding" tub click on "History".


3.Click on "Export"


4.Select "Funding" and select the date range thenclick on "Export" .


5.Click on "Download".
(It takes some time until the data is ready.)


Please note:
The download file is a zipped file.
Please unzip it before uploading it to Cryptact.

Reference for Windows users

Please install 7-Zip, and follow the below steps to unzip the file.
「7-Zip」https://sevenzip.osdn.jp/download.html
1) Right-click the file you want to unzip, and select "7-Zip" from the menu.
2) When the 7-ZIP menu appears, click "Extract files…" option.
3) Check which folder the unzipped file will be placed. If you want to the unzipped file to be placed in a different folder, click the "" button beside the "Extract to" field.
4) Click "OK".

 

 

 

Upload trade history from Bybit

After downloading the trade history, please upload it via the upload screen.

 

We have several help pages for this exchange. Please check them.