The Binance API has multiple limitations that might make it difficult to use. If your Binance API does not report your entire transaction history then you might need to use the CSV files instead.
Step 1 - Exporting the correct files
Binance can generate a lot of different CSV files, each for a specific type of transaction. It is not recommended to export all the different formats.
The 'Transaction History' format contains all transactions so this is the only format that needs to be exported (except for margin trades, see more below).
See this article or this Youtube video on how to export the Transaction History.
Binance has recently added some restrictions so that you can only export the Transaction History file 4 times per month and that each file can only contain 3 months of data. This means that you can only export 1 year of data per calendar month.
Step 2 - Importing to Koinly
After downloading your files from Binance, you can import them to your Binance wallet in Koinly.
The files generated by Binance will usually be in a format called .tar.gz. This is a compressed format so the CSV file itself needs to be extracted from this file.
Some operating systems can do this if you just right-click on the file and select 'extract here' but some operating systems will need specialized software for this such as 7-zip or WinRar.
Make sure that you import your entire Binance history to Koinly.
Step 3 - Checking the results
After importing all the files, you should give Koinly a few minutes to process the data. You can then check if the balances calculated by Koinly match the actual balances that you have in your Binance account (this will only work if you have imported the entire history up until today's date).
You should then click on the 'Having trouble?' banner to open the Troubleshoot page. This page will tell you if there are any Missing Purchase History errors. If there are no such errors then your wallet is most likely accurate. If you have some Missing Purchase Histpry errors then you should proceed to step 4.
This is how the Missing Purchase History errors will be shown on the Troubleshoot page:
Step 4 - Importing missing data
The 'Transaction History' file will include most of your data but margin trades are not included (reasons unknown).
The Transaction History file will include all other margin activity such as loans and repayments but not the trades themselves.
To export your Cross Margin Trades, click here or go to
Orders > Margin Order > Trade History > Export Trade History
For Isolated Margin Trades, you can go to the same page but select the 'Isolated' option at the top and then Export Trade History
The Margin Trade history does not have the same limitations as the Transaction History export so you can export up to 1 year of data in each file.
After exporting your entire margin trade history for both Cross Margin and Isolated Margin, you can import the files to your Binance wallet on Koinly.
P2P trades up to and including August 2021 are included in the Transaction History file but any P2P trade made in September or later will not be included.
You can export your P2P orders here