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 changed their exports so that each file can now contain up to 1 year of data!
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 Troubleshoot button 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 History 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
It seems that Binance has addressed the previous limitations with the Transaction History export. It seems to now include all transaction types!