Coin2086
Crypto Taxes Made Easy ! 📒
Coin2086 is a Python module that makes it easy for French tax residents to fill their crypto-currency tax return.
Tax autorities requires French tax residents to report their profit and losses (PnL) on each of their cryto-currency sales of the previous year on Formulaire n°2086.
The formula to compute your profit and losses, detailed on Formulaire n°2086, requires you to valuate your whole crypto-currency portfolio every time you sell, and keep track of the amount of initial investment capital that was sold. This accounting is tedious to do by hand.
Coin2086 does all of that automatically for you. It takes your trades as input, valuates your cryptocurrency portfolio, computes your taxable profit and outputs the exact information you need to fill on Formulaire n°2086.
It's that simple !
📖 Documentation: https://coin2086.readthedocs.io/
📦 PyPI Package: https://pypi.org/project/coin2086/
📝 Example Jupyter Notebook: Launch on Binder
💻 GitHub Project: https://github.com/fandre90/coin2086
Installation
pip install coin2086
Alternatively, you may use the Binder Notebook directly in your browser
Basic Usage
>>> import pandas as pd
>>> import coin2086
>>> trades = pd.read_csv('trades.csv')
>>> trades
datetime trade_side cryptocurrency quantity price base_currency amount fee
0 2019-10-19 11:10:00 BUY BTC 1.00 7149.38 EUR 7149.3800 35.746900
1 2019-11-14 19:50:00 SELL BTC 0.50 7844.88 EUR 3922.4400 19.612200
2 2020-07-28 10:20:00 BUY BTC 2.00 9262.42 EUR 18524.8400 92.624200
3 2020-09-01 12:20:00 BUY ETH 5.00 393.58 EUR 1967.9000 9.839500
4 2020-09-05 16:50:00 SELL BTC 1.00 8722.70 EUR 8722.7000 43.613500
5 2020-09-08 12:40:00 SELL ETH 5.00 285.07 EUR 1425.3500 7.126750
6 2020-12-20 09:10:00 SELL BTC 0.25 19223.90 EUR 4805.9750 24.029875
7 2021-03-13 23:40:00 SELL BTC 0.25 50025.17 EUR 12506.2925 62.531463
>>> year = 2020
>>> form2086, taxable_profit = coin2086.compute_taxable_pnls(trades, year=year)
>>> print(f"Total taxable profit for year {year}: {taxable_profit:.2f} euros")
Total taxable profit for year 2020: 2038.50 euros
>>> form2086
Description ... Plus-values et moins-values [pnl]
4 SELL 1.00 BTC ... -371.708792
5 SELL 5.00 ETH ... -102.332358
6 SELL 0.25 BTC ... 2512.542417
[3 rows x 10 columns]
For more information, check out the documentation or the example notebook
Release files for coin2086 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| coin2086-0.1.3.tar.gz | 13.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| coin2086-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.5 kB
Release files / coin2086-0.1.3.tar.gz
| Download URL | coin2086-0.1.3.tar.gz |
|---|---|
| Size | 13.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
28d725bf5e472ae58a24ca59b6f222b987f7278998d3e4105af027710be90887
|
|
BLAKE2b-256 checksum How to use checksums |
ea1a2d55e71eb44944e10eb8b31b11ceca347229566bec5770f25bd4de84c66a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.5 CPython/3.9.2 Linux/5.10.0-6-amd64
|
Release files / coin2086-0.1.3-py3-none-any.whl
| Download URL | coin2086-0.1.3-py3-none-any.whl |
|---|---|
| Size | 13.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fa5d564a5f0830d5e1f52b3861d8bf8e21bafc3bdb9cffbb29adee84733d48db
|
|
BLAKE2b-256 checksum How to use checksums |
d7e3965a496fa8385345ca77762d1ada34c9d670e4fde8b5828ad46ebc5a80b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.5 CPython/3.9.2 Linux/5.10.0-6-amd64
|