API
Click your email at the top and select Account & Security. Then click the API Management tab (https://www.bybit.com/app/user/api-management).
At the top right, click Create New Key.
Keep the API Transaction option selected. Give your key a name, and leave Connect With IP blank. Set Active Order and Positions for Key Permission and check the Read Only box.
CSV
Go to your Bybit Assets History (https://www.bybit.com/app/wallet/money-record).
Click Export at the top right.
Upload the XLSL or CSV file to TokenTax.
Instructions from Bybit site as of early 2022:
Data Export Service Scope Disclaimer:
Please take note that only Derivertive Account data is available to be exported. Spot Account and Byfi Account data are not available to be exported at this moment. However, the data can be found here: https://www.bybit.com/user/assets/records/trade-spot/deposit.
Trade history can be exported on your own at https://www.bybit.com/user/assets/order/trade-history/inverse.
Close P&L can be exported on your own at https://www.bybit.com/user/assets/order/closed-pnl/inverse.
If these CSVs are not available, contact Bybit and request your CSV reports.