Semi-automatically scrape Koinly.io crypto transactions and export them to CSVs to upload on various tax websites such as CoinTracker.io and TurboTax.intuit.com.
The currently supported exports are for:
- CoinTracker.io
- TurboTax.intuit.com
While doing taxes, I found that each crypto tax site has its own strengths and weaknesses. I was able to reconcile my portfolio the best with Koinly.io and wanted to compare the reconciled data with other crypto tax sites. koinly-csv-exporter
allows you to do just that. It can also prepare a CSV for importing into TurboTax.
I'm not a tax expert and I'm not giving tax advice. Don't rely on this code to do your taxes for you. You must have ALL CSVs generated by this software reviewed by a tax professional. I will not be held responsible for anyone's taxes.
- Run
npm install
- Run
npm run build
- Log in to Koinly and go to the transactions page: https://app.koinly.io/p/transactions?order=date&page=1&perPage=25
- Set up your filter criteria, open the Network tab in the Chrome Dev Tools and reload the page.
- Copy and paste the
fetchAll
function into the Chrome Dev Tools console. - In the network tab, look for the request with a name like this:
transactions?order=date&per_page=25&page=1
- Right click it > Copy > Copy as fetch.
- Paste the fetch statement into the Chrome Dev Tools console.
- Edit the
fetch
function name tofetchAll
. - Press enter and wait for the transactions to be printed to the console.
- Copy the transactions output from the console and save it to a file.
After gathering the transaction data, run:
npm run start -- some-koinly-data.json -o output.csv -t SOME_TYPE
See COPYING.md
for licesning.
Please feel free to add support for more CSV export types.
The outline for adding a new CSV export type looks like the following:
- A factory for:
- Type/Label type
- Header type
- Value getter
- An enum for:
- Type/Label type
- Header type
- Output type
- A validator