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.3.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

coin2086-0.1.3-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: coin2086-0.1.3.tar.gz
  • Upload date:
  • Size: 13.7 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.3.tar.gz
Algorithm Hash digest
SHA256 28d725bf5e472ae58a24ca59b6f222b987f7278998d3e4105af027710be90887
MD5 1377130bf048517ae4016114105eb24f
BLAKE2b-256 ea1a2d55e71eb44944e10eb8b31b11ceca347229566bec5770f25bd4de84c66a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: coin2086-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 13.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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 fa5d564a5f0830d5e1f52b3861d8bf8e21bafc3bdb9cffbb29adee84733d48db
MD5 99ca47a81935c5131cefad9fac183b70
BLAKE2b-256 d7e3965a496fa8385345ca77762d1ada34c9d670e4fde8b5828ad46ebc5a80b6

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