Pionex changed the format of their CSV making my old guide obsolete. The new format does not import directly to Koinly and still needs to be formatted to import to Koinly but now it is easier than ever!
I was working on a new video and walkthrough guide when a viewer reached out to me with a solution using a PowerShell script. The script completely automates importing the Pionex CSV to the Koinly CSV. A few quick edits to the script and its ready to go.
Check out the new video to this guide here.
Pionex --> Koinly
Tip: Be sure to use either Google Sheets or LibreOffice Calc when interacting with the CSV/XLSX files. Using Microsoft Excel may lead to encoding errors!
1) Pionex has added a new feature allowing users to export their transaction history using their app. Just log into the app, go to: [Account] -> [Customer Support] -> [Export Transactions History]. You will see which account you are exporting history for and a selection to set the date range you are wanting to export. Set the date range you are looking for and click [Submit]. You will receive an email from Pionex stating the file will be generated within 24 hours but I have exported a couple of times making this guide and it never took longer than 5-10 minutes. You will receive a second email when the file is ready. Head back to [Export Transactions History] in the app and you can download the file. I emailed this file to myself to access it on my computer.
You will notice the file is now in XLSX format. There are also individual sheets/tabs for trades, deposits and withdrawals, dust collector transactions, and a sheet to use with CoinTracker.
I still prefer to use Koinly as it has lower prices compared to CoinTracker. As of this date, CoinTracker's 1000 transaction plan is $179 where Koinly's is $99. You can view pricing for both using these lines: Koinly and Cointracker. Both services offer outstanding portfolio tracking and I am not promoting either service.
2) Using Google Sheets, download the "trades" tab as a CSV file. Save the file to a new folder on your desktop so it is easy to locate.
3) Dowload Koinly's Universal Format CSV to the same folder.
4) Download the Pionex2Koinly script here. Right click the link and select Save As, then save the file in the same folder with the Pionex and Koinly CSV. The file is saved as a .txt file allowing you to edit it easily. Open it and find these two lines, C:\PATH_TO_PIONEX_CSV and C:\PATH_TO_KOINLY_CSV. Change these to the corresponding file paths and save the file with the extension .ps1.
5) You are now ready to run the script. To open PowerShell, simply search for PowerShell on the Windows Start menu. I prefer to use PowerShell ISE. When you find the program be sure to right click it and select Run As Administrator. From PowerShell ISE, click [File] -> [Open] and navigate to the script you saved. Press the green play button on the toolbar and the script will convert the CSV file.
6) You may encounter an error when running the script stating something like "cannot be loaded because running scripts is disabled on this system." This is due to PowerShell's execution policy is set to restricted by default and to change it you need to change the policy using the Set-ExecutionPolicy cmdlet. Either Google how to execute this command or click here. I used the RemoteSigned policy and it fixed the error.
That's it! Open the Koinly CSV file (Remember Sheets or Libre Calc only!) and see data from the Pionex CSV entered and ready to go! When uploading to Koinly, I had to use the LIFO (Last In First Out) cost basis method to accurately reflect my gains/losses.