Skip to main content

French Crypto Taxes Made Easy

Project description

Coin2086

Crypto Taxes Made Easy ! 📒

PyPI Version PyPI Python Version PyPI License Documentation Status Binder

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coin2086-0.1.2.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

coin2086-0.1.2-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file coin2086-0.1.2.tar.gz.

File metadata

  • Download URL: coin2086-0.1.2.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.9.2 Linux/5.10.0-6-amd64

File hashes

Hashes for coin2086-0.1.2.tar.gz
Algorithm Hash digest
SHA256 97e35feb3b2aaf0b62ee806e0cdf8585d0723951a1512ef8c8764f8fac2ee4c1
MD5 b8b6a79b3b5d8d04c9f913c8c208036e
BLAKE2b-256 e0346d6dce38b74b8eb57b14271f26b0fd8fe52962d199a35832f5b172a34a0b

See more details on using hashes here.

File details

Details for the file coin2086-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: coin2086-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.9.2 Linux/5.10.0-6-amd64

File hashes

Hashes for coin2086-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cfa1ce6c9d0dd00d16618daf55b52b2cc29058ec9c7c2e5d17ed186c071984b8
MD5 d3f6669585716404304497a8e3d7769c
BLAKE2b-256 14a27832c9137dd722a54e26b682a0b11dcd1ab4acc75921e5227d971885945f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page