If you have had the misfortune of trading spot margin on FTX :) and have fill data, you can use this to aggregate all your trades, fees and balances in one place so that you can use a crypto tax filing software such as Accointing.
You can try it here: https://ftx-fills-accointing.vercel.app/
You can directly paste the fills into the text area, this will then aggregate all of them, return a final trade date and balance. You can then use this and tag each as margin_gain, margin_loss and then upload it to Accointing for e.g
You need to enter it in the raw format like this:
The accointing template is here https://www.accointing.com/app/templates/Accointing_template.xlsx
Please use at own risk and check if the numbers make sense when compared to what your actual pnl is.