Skip to content

Commit 7a99e2e

Browse files
committed
Merge branch 'release/v0.0.2'
2 parents 1f205a1 + 6e1ae57 commit 7a99e2e

File tree

6 files changed

+181
-4
lines changed

6 files changed

+181
-4
lines changed

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Changelog
2+
3+
All notable changes to `cryptocredible` will be documented in this file
4+
5+
## v0.0.2 - 2021-11-30
6+
- Update readme.
7+
8+
## v0.0.1 - 2021-11-30
9+
- Initial beta release with Coinbase and Coinbase Pro exchange connections.

CONTRIBUTING.md

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Contributing
2+
3+
Contributions are **welcome** and will be fully **credited**.
4+
5+
Please read and understand the contribution guide before creating an issue or pull request.
6+
7+
## Etiquette
8+
9+
This project is open source, and as such, the maintainers give their free time to build and maintain the source code
10+
held within. They make the code freely available in the hope that it will be of use to other developers. It would be
11+
extremely unfair for them to suffer abuse or anger for their hard work.
12+
13+
Please be considerate towards maintainers when raising issues or presenting pull requests. Let's show the
14+
world that developers are civilized and selfless people.
15+
16+
It's the duty of the maintainer to ensure that all submissions to the project are of sufficient
17+
quality to benefit the project. Many developers have different skillsets, strengths, and weaknesses. Respect the maintainer's decision, and do not be upset or abusive if your submission is not used.
18+
19+
## Viability
20+
21+
When requesting or submitting new features, first consider whether it might be useful to others. Open
22+
source projects are used by many developers, who may have entirely different needs to your own. Think about
23+
whether or not your feature is likely to be used by other users of the project.
24+
25+
## Procedure
26+
27+
Before filing an issue:
28+
29+
- Attempt to replicate the problem, to ensure that it wasn't a coincidental incident.
30+
- Check to make sure your feature suggestion isn't already present within the project.
31+
- Check the pull requests tab to ensure that the bug doesn't have a fix in progress.
32+
- Check the pull requests tab to ensure that the feature isn't already in progress.
33+
34+
Before submitting a pull request:
35+
36+
- Check the codebase to ensure that your feature doesn't already exist.
37+
- Check the pull requests to ensure that another person hasn't already submitted the feature or fix.
38+
39+
## Requirements
40+
41+
If the project maintainer has any additional requirements, you will find them listed here.
42+
43+
- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](https://pear.php.net/package/PHP_CodeSniffer).
44+
45+
- **Add tests!** - Your patch won't be accepted if it doesn't have tests.
46+
47+
- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.
48+
49+
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](https://semver.org/). Randomly breaking public APIs is not an option.
50+
51+
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
52+
53+
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](https://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.
54+
55+
**Happy coding**!

LICENSE LICENSE.md

File renamed without changes.

README.md

+114-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,114 @@
1-
coming soon
1+
# CryptoCredible
2+
#### The missing crypto-exchange data exporter
3+
4+
###### _tldr: run locally to export your crypto tx data from popular exchanges via api connections._
5+
6+
Ever tried to export your crypto transactions from an exchange only to find out there's missing data? 🙄<br>
7+
...or that the file format is completely different from every other exchange? 🙄<br>
8+
...or that they didn't account for the fees, so your tax is now too high? 🙄
9+
10+
Well, this tool is for you...
11+
12+
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.
13+
14+
What's better is the output is designed to work perfectly with the amazing open source tax software [BittyTax](https://github.com/BittyTax/BittyTax).
15+
16+
#### Supported exchanges
17+
* [Coinbase](https://github.com/leeovery/cryptocredible/tree/develop#coinbase)
18+
* [Coinbase Pro](https://github.com/leeovery/cryptocredible/tree/develop#coinbase-pro)
19+
* _...with more coming soon!_
20+
21+
## Installation
22+
23+
To run CryptoCredible you will first need to install php locally on your system.
24+
25+
#### Apple
26+
For Mac users this is easy.
27+
28+
Install HomeBrew using their instructions [here](https://brew.sh/), then install php by entering this command into a Terminal window:
29+
30+
```bash
31+
brew install php
32+
```
33+
34+
#### Windows
35+
Windows is a little more complex.
36+
37+
A standalone phar file will be supported soon, but for now, you could use [Docker](https://docs.docker.com/desktop/windows/install/) or [WSL2](https://www.sitepoint.com/wsl2/).
38+
39+
## Usage
40+
41+
First you need to configure your api connections with your crypto exchange(s) - see below.
42+
43+
Once that's done, open up a terminal window and run the command suitable for your exchange(s):
44+
45+
#### Coinbase
46+
47+
Login into your [Coinbase](https://www.coinbase.com/settings/api) 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:
48+
49+
```bash
50+
COINBASE_API_KEY=[api key here]
51+
COINBASE_API_SECRET=[api secret here]
52+
```
53+
54+
Then run this command in a terminal window from the root directory of this project:
55+
56+
``` php
57+
php cryptocredible sync:coinbase
58+
```
59+
60+
#### Coinbase Pro
61+
62+
Login into your [Coinbase Pro](https://pro.coinbase.com/profile/api) account and create new **view** api credentials. Paste them into the `.env` file at the root of the project directory:
63+
64+
```bash
65+
COINBASE_PRO_API_KEY=[api secret here]
66+
COINBASE_PRO_API_SECRET=[api secret here]
67+
COINBASE_PRO_API_PASSPHRASE=[api passphrase here]
68+
```
69+
70+
Then run this command in a terminal window from the root directory of this project:
71+
72+
``` php
73+
php cryptocredible sync:coinbase-pro
74+
```
75+
76+
### Options
77+
78+
Each command accepts the follow options:
79+
80+
| Argument | Shortcut | Description | default |
81+
|---|---|---|---|
82+
| --output-dir | -o | Provide a dir on local file system to output csv to | ./../ |
83+
| --json | -j | Provide a json file rather than fetch txs via api. | n/a |
84+
| --dump | n/a | Dump all the transactions fetched via the api into a json file. | n/a |
85+
86+
### Is it safe?
87+
88+
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:
89+
* It runs locally on your own computer, and you have total control over the data and even the code.
90+
* The exchange connections are configured via the `.env` file using **read-only** api credentials. These credentials never leave your system in a usable format.
91+
* 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.
92+
93+
_Trust but verify._
94+
95+
### Changelog
96+
97+
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
98+
99+
## Contributing
100+
101+
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
102+
103+
### Security
104+
105+
If you discover any security related issues, please email me@leeovery.com instead of using the issue tracker.
106+
107+
## Credits
108+
109+
- [Lee Overy](https://github.com/leeovery)
110+
- [All Contributors](../../contributors)
111+
112+
## License
113+
114+
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

app/ValueObjects/Transaction.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -68,21 +68,21 @@ public function setType(TransactionType $type): static
6868
return $this;
6969
}
7070

71-
public function setSellAmount(Amount $sellAmount): static
71+
public function setSellAmount(?Amount $sellAmount): static
7272
{
7373
$this->sellAmount = $sellAmount;
7474

7575
return $this;
7676
}
7777

78-
public function setBuyAmount(Amount $buyAmount): static
78+
public function setBuyAmount(?Amount $buyAmount): static
7979
{
8080
$this->buyAmount = $buyAmount;
8181

8282
return $this;
8383
}
8484

85-
public function setFee($fee): static
85+
public function setFee(?Amount $fee): static
8686
{
8787
$this->fee = $fee;
8888

builds/cryptocredible

-7.05 MB
Binary file not shown.

0 commit comments

Comments
 (0)