Code Monkey home page Code Monkey logo

cryptocredible's Introduction

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:

  • It runs locally on your own computer, and you have total control over the data and even the code.
  • The exchange connections are configured via the .env file using read-only api credentials. These credentials never leave your system in a usable format.
  • The code is open-source, so feel free to poke around and ensure it's safe. Other people have probably poked around too. Safety in numbers.

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 [email protected] instead of using the issue tracker.

Credits

License

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

cryptocredible's People

Contributors

leeovery avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

likecarpacho

cryptocredible's Issues

coinbase etc wallet problem

Hi Lee,

when I run cryptocredible for Coinbase I get the errors below with the dump request. Thanks, huggyvilla

C:\xampp\cryptocredible-main>php cryptocredible sync:coinbase --dump

    Coinbase

  • Fetch transactions     *
    

Open Coinbase connection: โœ”
Fetch transactions for:
ETH2 Wallet: โœ”
XRP Wallet: โœ”
BSV Wallet: โœ”
BAT Wallet: โœ”
Portefeuille en USDC: โœ”
Portefeuille en ZRX: โœ”
BCH Wallet: โœ”
ETC Wallet: failed

Illuminate\Http\Client\RequestException

HTTP request returned status code 400:
{"errors":[{"id":"validation_error","message":"Unknown currency"}]}

at C:\xampp\cryptocredible-main\vendor\illuminate\http\Client\Response.php:288
284โ–• /
285โ–• public function toException()
286โ–• {
287โ–• if ($this->failed()) {
โžœ 288โ–• return new RequestException($this);
289โ–• }
290โ–• }
291โ–•
292โ–• /
*

1 C:\xampp\cryptocredible-main\vendor\illuminate\http\Client\Response.php:305
Illuminate\Http\Client\Response::toException()

2 C:\xampp\cryptocredible-main\vendor\illuminate\http\Client\PendingRequest.php:683
Illuminate\Http\Client\Response::throw()

Incorrect notes on Coinbase Pro

On transfer type, the notes always indicate that the asset is moving to or from Coinbase.

However this is not always the case. Not sure of the pattern yet, but in some cases deposits go direct to Coinbase Pro, rather than routed via Coinbase.

The transactions seem fine so its just the notes column that needs adjusted for better records.

Error creating dump Coinbase pro

Hi Lee,

I tried to get the dump to work with Coinbase Pro and this is what the CMD spat out (hope it helps):

C:\xampp\cryptocredible-main>php cryptocredible sync:coinbase-pro --dump

        Coinbase Pro

  • Fetch transactions     *
    

Open Coinbase Pro connection: โœ”
Fetch transactions for:
1INCH Wallet: โœ”
AAVE Wallet: โœ”
ACH Wallet: โœ”
ADA Wallet: โœ”
AGLD Wallet: โœ”
ALCX Wallet: โœ”
ALGO Wallet: โœ”
AMP Wallet: โœ”
ANKR Wallet: โœ”
API3 Wallet: โœ”
ARPA Wallet: โœ”
ASM Wallet: โœ”
ATOM Wallet: โœ”
AUCTION Wallet: โœ”
AVAX Wallet: โœ”
AXS Wallet: โœ”
BADGER Wallet: โœ”
BAL Wallet: โœ”
BAND Wallet: โœ”
BAT Wallet: โœ”
BCH Wallet: โœ”
BICO Wallet: โœ”
BLZ Wallet: โœ”
BNT Wallet: โœ”
BOND Wallet: โœ”
BTC Wallet: โœ”
BTRST Wallet: โœ”
CGLD Wallet: โœ”
CHZ Wallet: โœ”
CLV Wallet: โœ”
COMP Wallet: โœ”
COTI Wallet: โœ”
COVAL Wallet: โœ”
CRO Wallet: โœ”
CRV Wallet: โœ”
CTSI Wallet: โœ”
CVC Wallet: โœ”
DAI Wallet: โœ”
DASH Wallet: โœ”
DDX Wallet: โœ”
DESO Wallet: โœ”
DNT Wallet: โœ”
DOGE Wallet: โœ”
DOT Wallet: โœ”
ENJ Wallet: โœ”
ENS Wallet: โœ”
EOS Wallet: โœ”
ETC Wallet: โœ”
ETH Wallet: โœ”
EUR Wallet: โœ”
FARM Wallet: โœ”
FET Wallet: โœ”
FIL Wallet: โœ”
FORTH Wallet: โœ”
FOX Wallet: โœ”
FX Wallet: โœ”
GALA Wallet: โœ”
GBP Wallet: โœ”
GNT Wallet: โœ”
GODS Wallet: โœ”
GRT Wallet: โœ”
GTC Wallet: โœ”
GYEN Wallet: โœ”
ICP Wallet: โœ”
IDEX Wallet: โœ”
IMX Wallet: โœ”
IOTX Wallet: โœ”
JASMY Wallet: โœ”
KEEP Wallet: โœ”
KNC Wallet: โœ”
KRL Wallet: โœ”
LCX Wallet: โœ”
LINK Wallet: โœ”
LOOM Wallet: โœ”
LPT Wallet: โœ”
LRC Wallet: โœ”
LTC Wallet: โœ”
MANA Wallet: โœ”
MASK Wallet: โœ”
MATIC Wallet: โœ”
MCO2 Wallet: โœ”
MDT Wallet: โœ”
MIR Wallet: โœ”
MKR Wallet: โœ”
MLN Wallet: โœ”
MUSD Wallet: โœ”
NKN Wallet: โœ”
NMR Wallet: โœ”
NU Wallet: โœ”
OGN Wallet: โœ”
OMG Wallet: โœ”
ORN Wallet: โœ”
OXT Wallet: โœ”
PAX Wallet: โœ”
PERP Wallet: โœ”
PLA Wallet: โœ”
POLS Wallet: โœ”
POLY Wallet: โœ”
POWR Wallet: โœ”
QNT Wallet: โœ”
QUICK Wallet: โœ”
RAD Wallet: โœ”
RAI Wallet: โœ”
RARI Wallet: โœ”
RBN Wallet: โœ”
REN Wallet: โœ”
REP Wallet: โœ”
REQ Wallet: โœ”
RGT Wallet: โœ”
RLC Wallet: โœ”
RLY Wallet: โœ”
SHIB Wallet: โœ”
SKL Wallet: โœ”
SNX Wallet: โœ”
SOL Wallet: โœ”
SPELL Wallet: โœ”
STORJ Wallet: โœ”
SUKU Wallet: โœ”
SUPER Wallet: โœ”
SUSHI Wallet: โœ”
TRAC Wallet: โœ”
TRB Wallet: โœ”
TRIBE Wallet: โœ”
TRU Wallet: โœ”
UMA Wallet: โœ”
UNI Wallet: โœ”
USDC Wallet: โœ”
USDT Wallet: โœ”
UST Wallet: โœ”
VGX Wallet: โœ”
WBTC Wallet: โœ”
WCFG Wallet: โœ”
WLUNA Wallet: โœ”
XLM Wallet: โœ”
XRP Wallet: โœ”
XTZ Wallet: โœ”
XYO Wallet: โœ”
YFI Wallet: โœ”
YFII Wallet: โœ”
ZEC Wallet: โœ”
ZRX Wallet: โœ”

Dumping data to ./../coinbase pro-transaction-dump-2022-01-10 11:23:28.json: failed

ErrorException

file_put_contents(./../coinbase pro-transaction-dump-2022-01-10 11:23:28.json): Failed to open stream: No such file or directory

at C:\xampp\cryptocredible-main\app\Commands\AbstractSyncCommand.php:111
107โ–• ->append($this->exchangeName.'-transaction-dump-'.now().'.json')
108โ–• ->lower();
109โ–• $this->newLine();
110โ–• $this->task("Dumping data to {$outputDir}", function () use ($outputDir, $transactions) {
โžœ 111โ–• file_put_contents($outputDir, $transactions->toJson());
112โ–• });
113โ–• }
114โ–• }
115โ–•

1 C:\xampp\cryptocredible-main\app\Commands\AbstractSyncCommand.php:111
file_put_contents("./../coinbase pro-transaction-dump-2022-01-10 11:23:28.json", "[{"id":"1451715444","amount":"0.0005000000000000","balance":"0.0005000088366767","created_at":"2019-06-15T15:15:41.445782Z","type":"transfer","details":{"transfer_id":"f22363fc-9187-4fc3-bf7c-2556d3f872b6","transfer_type":"deposit"},"currency":"BCH"},{"id":"536157932","amount":"0.0000000088366767","balance":"0.0000000088366767","created_at":"2017-12-19T00:28:30.085466Z","type":"transfer","details":{"source":"fork","source_account_id":"f219b7b7-980d-426b-beb0-1e60e97af48a","ticker":"BCH"},"currency":"BCH"},{"id":"8223379118","amount":"-0.2150367400000000","balance":"0.0000000062311484","created_at":"2021-06-21T21:47:05.052136Z","type":"match","details":{"order_id":"c7d9d739-637a-42e8-bab3-477d08083e42","product_id":"BTC-GBP","trade_id":"19972032"},"currency":"BTC"},{"id":"8223379101","amount":"-0.0250000000000000","balance":"0.2150367462311484","created_at":"2021-06-21T21:47:05.045206Z","type":"match","details":{"order_id":"c7d9d739-637a-42e8-bab3-477d08083e42","product_id":"BTC-GBP","t...")

2 C:\xampp\cryptocredible-main\vendor\nunomaduro\laravel-console-task\src\LaravelConsoleTaskServiceProvider.php:49
App\Commands\AbstractSyncCommand::App\Commands{closure}()

C:\xampp\cryptocredible-main>

Rebate issue Coinbase Pro

Hi Lee,

when I run the command for coinbase Pro below are the errors. Thanks Huggvilla

C:\xampp\cryptocredible-main>php cryptocredible sync:coinbase-pro

        Coinbase Pro

  • Fetch transactions     *
    

Open Coinbase Pro connection: โœ”
Fetch transactions for:
1INCH Wallet: โœ”
AAVE Wallet: โœ”
ACH Wallet: โœ”
ADA Wallet: โœ”
AGLD Wallet: โœ”
ALCX Wallet: โœ”
ALGO Wallet: โœ”
AMP Wallet: โœ”
ANKR Wallet: โœ”
API3 Wallet: โœ”
ARPA Wallet: โœ”
ASM Wallet: โœ”
ATOM Wallet: โœ”
AUCTION Wallet: โœ”
AVAX Wallet: โœ”
AXS Wallet: โœ”
BADGER Wallet: โœ”
BAL Wallet: โœ”
BAND Wallet: โœ”
BAT Wallet: โœ”
BCH Wallet: โœ”
BICO Wallet: โœ”
BLZ Wallet: โœ”
BNT Wallet: โœ”
BOND Wallet: โœ”
BTC Wallet: โœ”
BTRST Wallet: โœ”
CGLD Wallet: โœ”
CHZ Wallet: โœ”
CLV Wallet: โœ”
COMP Wallet: โœ”
COTI Wallet: โœ”
COVAL Wallet: โœ”
CRO Wallet: โœ”
CRV Wallet: โœ”
CTSI Wallet: โœ”
CVC Wallet: โœ”
DAI Wallet: โœ”
DASH Wallet: โœ”
DDX Wallet: โœ”
DESO Wallet: โœ”
DNT Wallet: โœ”
DOGE Wallet: โœ”
DOT Wallet: โœ”
ENJ Wallet: โœ”
ENS Wallet: โœ”
EOS Wallet: โœ”
ETC Wallet: โœ”
ETH Wallet: โœ”
EUR Wallet: โœ”
FARM Wallet: โœ”
FET Wallet: โœ”
FIL Wallet: โœ”
FORTH Wallet: โœ”
FOX Wallet: โœ”
FX Wallet: โœ”
GALA Wallet: โœ”
GBP Wallet: โœ”
GNT Wallet: โœ”
GODS Wallet: โœ”
GRT Wallet: โœ”
GTC Wallet: โœ”
GYEN Wallet: โœ”
ICP Wallet: โœ”
IDEX Wallet: โœ”
IMX Wallet: โœ”
IOTX Wallet: โœ”
JASMY Wallet: โœ”
KEEP Wallet: โœ”
KNC Wallet: โœ”
KRL Wallet: โœ”
LCX Wallet: โœ”
LINK Wallet: โœ”
LOOM Wallet: โœ”
LPT Wallet: โœ”
LRC Wallet: โœ”
LTC Wallet: โœ”
MANA Wallet: โœ”
MASK Wallet: โœ”
MATIC Wallet: โœ”
MCO2 Wallet: โœ”
MDT Wallet: โœ”
MIR Wallet: โœ”
MKR Wallet: โœ”
MLN Wallet: โœ”
MUSD Wallet: โœ”
NKN Wallet: โœ”
NMR Wallet: โœ”
NU Wallet: โœ”
OGN Wallet: โœ”
OMG Wallet: โœ”
ORN Wallet: โœ”
OXT Wallet: โœ”
PAX Wallet: โœ”
PERP Wallet: โœ”
PLA Wallet: โœ”
POLS Wallet: โœ”
POLY Wallet: โœ”
POWR Wallet: โœ”
QNT Wallet: โœ”
QUICK Wallet: โœ”
RAD Wallet: โœ”
RAI Wallet: โœ”
RARI Wallet: โœ”
RBN Wallet: โœ”
REN Wallet: โœ”
REP Wallet: โœ”
REQ Wallet: โœ”
RGT Wallet: โœ”
RLC Wallet: โœ”
RLY Wallet: โœ”
SHIB Wallet: โœ”
SKL Wallet: โœ”
SNX Wallet: โœ”
SOL Wallet: โœ”
SPELL Wallet: โœ”
STORJ Wallet: โœ”
SUKU Wallet: โœ”
SUPER Wallet: โœ”
SUSHI Wallet: โœ”
TRAC Wallet: โœ”
TRB Wallet: โœ”
TRIBE Wallet: โœ”
TRU Wallet: โœ”
UMA Wallet: โœ”
UNI Wallet: โœ”
USDC Wallet: โœ”
USDT Wallet: โœ”
UST Wallet: โœ”
VGX Wallet: โœ”
WBTC Wallet: โœ”
WCFG Wallet: โœ”
WLUNA Wallet: โœ”
XLM Wallet: โœ”
XRP Wallet: โœ”
XTZ Wallet: โœ”
XYO Wallet: โœ”
YFI Wallet: โœ”
YFII Wallet: โœ”
ZEC Wallet: โœ”
ZRX Wallet: โœ”


  • Process transactions     *
    

Normalise data & match up trades: failed

No matching tx mapper found for coinbase pro tx type 'rebate'.

C:\xampp\cryptocredible-main>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.