leeovery / cryptocredible

Run locally to export crypto tx data from crypto exchanges using their api connections, and process into a normalised format.
MIT License
7 stars 2 forks source link
bitcoin coinbase coinbase-api coinbase-pro coinbase-pro-api crypto crypto-tax cryptocurrency hmrc irs tax

CryptoCredible

The missing crypto-exchange data exporter

tldr: run locally to export your crypto tx data from popular exchanges via api connections.

Ever tried to export your crypto transactions from an exchange only to find out there's missing data? 🙄
...or that the file format is completely different from every other exchange? 🙄
...or that they didn't account for the fees, so your tax is now too high? 🙄

Well, this tool is for you...

Install locally, and with a single command, CryptoCredible will safely and securely fetch all your transaction data, and output a csv file with nothing missing, in a single standard format.

What's better is the output is designed to work perfectly with the amazing open source tax software BittyTax.

Supported exchanges

Installation

To run CryptoCredible you will first need to install php locally on your system.

Apple

For Mac users this is easy.

Install HomeBrew using their instructions here, then install php by entering this command into a Terminal window:

brew install php

Windows

Windows is a little more complex.

A few options to get php running on your system:

Install Dependancies

Once you have setup php locally, you now need to download this package and install the required dependancies using composer. If you don't have composer installed go here and follow the instructions.

To install the dependancies, open up a fresh terminal window, change directory to the root of this project, and run:

composer install

You should be ready to move forward now.

Usage

First you need to configure your api connections with your crypto exchange(s) - see below.

Once that's done, open up a terminal window and run the command suitable for your exchange(s):

Coinbase

Login into your Coinbase account to create new api credentials, selecting all the permissions with :read in them. Paste the credentials into the .env file at the root of the project directory using the following structure:

COINBASE_API_KEY=[api key here]
COINBASE_API_SECRET=[api secret here]

Then run this command in a terminal window from the root directory of this project:

php cryptocredible sync:coinbase

Coinbase Pro

Login into your Coinbase Pro account and create new view api credentials. Paste them into the .env file at the root of the project directory:

COINBASE_PRO_API_KEY=[api secret here]
COINBASE_PRO_API_SECRET=[api secret here]
COINBASE_PRO_API_PASSPHRASE=[api passphrase here]

Then run this command in a terminal window from the root directory of this project:

php cryptocredible sync:coinbase-pro

Options

Each command accepts the follow options:

Argument Shortcut Description default
--output-dir -o Provide a dir on local file system to output csv to ./../
--json -j Provide a json file rather than fetch txs via api. n/a
--dump n/a Dump all the transactions fetched via the api into a json file. n/a

Is it safe?

Yes, but you are using it without warranty, and at your own risk. Having said that, here are some strong points which make this safe:

Trust but verify.

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email me@leeovery.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.