2/7/2021: Margin trading from Kraken is not supported for tax reporting by CryptoTrader.Tax at this time. Margin trading features are currently under development and will be available in the near future.
Login To Your Kraken Account
Click on the History link on the top of the page and then click the Export tab.
Select Ledgers from the type drop down, make sure that All Fields are selected, and then set your export date range to include your full transaction history on Kraken.
Select Submit and then when the file shows Processed, click on to Download menu on the right side. Kraken will give you a ledgers.zip file by default. Unzip that file so you have the .csv that is inside.
Navigate to the Kraken tab on CryptoTrader.Tax and drag the file CSV file you just unzipped into the blue box.