All Projects → provinzio → CoinTaxman

provinzio / CoinTaxman

Licence: AGPL-3.0 license
Calculate your taxes from cryptocurrency gains

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to CoinTaxman

Crypto vba
An Excel/VBA project to communicate with various cryptocurrency exchanges APIs
Stars: ✭ 103 (-6.36%)
Mutual labels:  coinbase, cryptocurrencies, kraken, binance
cryptogalaxy
Get any cryptocurrencies ticker and trade data in real time from multiple exchanges and then save it in multiple storage systems.
Stars: ✭ 96 (-12.73%)
Mutual labels:  kraken, binance, coinbase-pro
add-tradingview-alerts-tool
Automated entry of TradingView alerts for bot trading tools such as 3Commas, Alertatron, CryptoHopper, etc.
Stars: ✭ 467 (+324.55%)
Mutual labels:  coinbase, kraken, binance
CryptoTickerBot
A .NET Core program to fetch ticker data from various crypto exchange websites.
Stars: ✭ 30 (-72.73%)
Mutual labels:  coinbase, kraken, binance
Crypto Signal
Github.com/CryptoSignal - #1 Quant Trading & Technical Analysis Bot - 3,100+ stars, 900+ forks
Stars: ✭ 3,690 (+3254.55%)
Mutual labels:  coinbase, binance, coinbase-pro
Trading Indicator
provide trading technical indicator values based on data of almost crypto currency exchanges
Stars: ✭ 31 (-71.82%)
Mutual labels:  coinbase, kraken, binance
Cryptofeed
Cryptocurrency Exchange Websocket Data Feed Handler
Stars: ✭ 643 (+484.55%)
Mutual labels:  coinbase, kraken, binance
Krypto Trading Bot
Self-hosted crypto trading bot (automated high frequency market making) written in C++
Stars: ✭ 2,589 (+2253.64%)
Mutual labels:  coinbase, kraken, binance
bitcointaxer
Crypto-TAX Gain/Loss Calculator
Stars: ✭ 33 (-70%)
Mutual labels:  accounting, kraken, binance
Xchange.js
Bitcoin and Altcoin exchange api aggregator / wrapper
Stars: ✭ 74 (-32.73%)
Mutual labels:  coinbase, cryptocurrencies, kraken
Exchanges Php
This is a virtual currency SDK that brings together multiple exchanges
Stars: ✭ 134 (+21.82%)
Mutual labels:  coinbase, kraken, binance
Nescience-Indexing-CLI
Nescience Software & Capital Rebalancing Tool
Stars: ✭ 26 (-76.36%)
Mutual labels:  coinbase, kraken, binance
Pi-Trader
A cryptocurrency day-trading bot for Raspberry Pi.
Stars: ✭ 44 (-60%)
Mutual labels:  coinbase, coinbase-pro
hands-on-elixir-and-otp-cryptocurrency-trading-bot
Source code to generate the "Hands-on Elixir & OTP: Cryptocurrency trading bot" book
Stars: ✭ 210 (+90.91%)
Mutual labels:  cryptocurrencies, binance
binance-downloader
Python tool to download Binance Candlestick (k-line) data from REST API
Stars: ✭ 44 (-60%)
Mutual labels:  cryptocurrencies, binance
ccex-api
Cryptocurrency exchanges realtime api wrapper
Stars: ✭ 29 (-73.64%)
Mutual labels:  coinbase, binance
binance-node-docker
Docker image for Binance full and light nodes
Stars: ✭ 24 (-78.18%)
Mutual labels:  cryptocurrencies, binance
market-maker-bot
MM Bot for OpenDEX. Make profits via arbitrage between OpenDEX and a connected CEX account like Binance 🤖
Stars: ✭ 84 (-23.64%)
Mutual labels:  kraken, binance
backtrading-python-binance
Backtesting several trading strategy and rank them according their profit return.
Stars: ✭ 108 (-1.82%)
Mutual labels:  cryptocurrencies, binance
Twitter Activated Crypto Trading Bot
Buys crypto through keyword detection in new tweets. Executes buy in 1 second and holds for a given time (e.g. Elon tweets 'doge', buys Dogecoin and sells after 5 minutes). Tested on Kraken and Binance exchanges
Stars: ✭ 92 (-16.36%)
Mutual labels:  kraken, binance

PULL REQUESTS are appreciated.

English

CoinTaxman helps you to bring your income from crypto trading, lending, ... into your tax declaration. At the moment CoinTaxman only covers my area of ​​application. Pull requests and requests via issues are welcome (see Key notes for users for more information).

German - Deutsch

CoinTaxman hilft dir dabei deine Einkünfte aus dem Krypto-Handel/-Verleih/... in die Steuererklärung zu bringen. Momentan deckt der CoinTaxman nur meinen Anwendungsbereich ab. Pull Requests und Anfragen über Issues sind gerne gesehen (siehe Key notes for users für weitere Informationen).

Disclaimer: use at your own risk

Currently supported countries

  • Germany

Currently supported exchanges

It is also possible to import a custom transaction history file. See here for more informations. The format is based on the awesome bittytax_conv-tool from BittyTax.

Requirements

  • Python 3.9
  • See requirements.txt for the required modules. Quick and easy installation can be done with pip.

pip install -r requirements.txt

Usage

  1. Adjust src/config.ini to your liking
  2. Add all your account statements in account_statements/
  3. Run python "src/main.py"

If not all your exchanges are supported, you can not (directly) calculate your taxes with this tool. You can use the custom import format here to make it happen.

Have a look at our Wiki for more information on how to obtain the account statement for your exchange.

Remark: The first run might take a while to fetch all required prices into the local database. The implementation is at the moment kinda bad and does one http request per required price. E.g. 1.000 trades (1.000 "buys" and 1.000 "sells") require 2.000 price fetches (and perhaps more for the paid fees). Each price fetch might take 3 seconds, which leads to 6.000 seconds = 1.6 hours. After the first run, all prices are stored locally which reduces the runtime way below 5 minutes.

Makefile

The Makefile offers multiple useful commands to quickly update the requirements, run the script, create a docker container, clean your code...

If you have make installed, you can use e.g. make run to execute the script. Please have a look in the Makefile for more information.

Run as docker container

Thanks to jhoogstraat, you can also run CoinTaxman as a docker container. The image is hosted on dockerhub: jeppy/cointaxman:latest.

Supporting the development

Please consider supporting the development of this tool by either using my Binance referral link if you want to create an account there or by donating to one of the adresses below.

BTC: 1AZMdztmZ8yZFDb5sdbWNp1wPT8gvvigwp

ETH: 0x4868d10b8bc347b374300a7b924e3ffdf937ea0f

Key notes for users

Requesting a new country

I would like to extend my tool for international usage. However, the chances are high that I am unfamiliar with the local conditions neither able to speak the language. I would not want to program the logic for something I can not look up properly. Because in general and especially when it comes to state affairs, I prefer to look at the primary source.

I am happy to implement your input or support you with the implementation. You can help by specifying detailed information about the taxation of crypto currency in the requested country. Information I require are for example

  • Country fiat (well that is easy... I might be able to figure it out by myself)
  • Taxation of crypto sells
  • Taxation from crypto lending
  • Taxation of airdrops
  • Are there special periods after which the sell is tax free?
  • ...

Not every aspect has to be implemented directly. We are free to start by implementing the stuff you need for your tax declaration.

I am looking forward to your issue or pull request. Your country was already requested? Hit the thumbs up button of that issue or participate in the process.

Requesting a new exchange

The crypto world is huge and so is the amount of available exchanges out there. I would love to make this tool as useful as possible for as many of you.

I am happy to implement your input or support you with the implementation. Please provide an example account statement for the requested exchange or some other kind of documentation.

Are you already familiar with the API of that exchange or know some other way to request historical prices for that exchange? Share your knowledge.

I am looking forward to your issue or pull request. Your exchange was already requested? Hit the thumbs up button of that issue or participate in the process.

Key notes for developers

Adding a new country

  • Add your country to the Country enum in src/core.py
  • Extend src/config.py to fit your tax regulation
  • Add a country specific tax evaluation function in src/taxman.py like Taxman._evaluate_taxation_GERMANY
  • Depending on your specific tax regulation, you might need to add additional functionality
  • Update the README with a documentation about the taxation guidelines in your country

Adding a new exchange

  • Add a read-in function like Book._read_binance in src/book.py
  • Add a way to retrieve price data from this exchange in src/price_data.py like PriceData._get_price_binance
  • Setup a wiki entry on how to retrieve the account statement and other useful information, which I can copy paste in our Wiki

Managing python module dependencies

We use pip-compile from pip-tools to manage our python requirements, which separates "real" dependencies (e.g. dependencies/requirements.in) from all dependencies with there sub-dependencies (see requirements.txt). To update the dependencies, please update the files in the dependencies folder and run make build-deps or the corresponding commands by hand (see Makefile).

Ideas on crypto-taxation

The taxation of cryptocurrency is probably not yet regulated down to the smallest detail in every country. Often there still seem to be ambiguities or gray areas. This section should help you to dig deeper into the subject. Feel free to commit details about the taxation in your country.

Taxation in Germany

Nach langer Unklarheit über die Besteuerung von Kryptowährung wurde am 10.05.2022 durch das Bundesministerium für Finanzen (BMF) ein Schreiben mit rechtsverbindlichen Vorgaben zur Versteuerung veröffentlicht.

Die ursprünglich hier stehenden Vermutungen und Interpretationen meinerseits habe ich aus der aktuellen README.md entfernt. Für Interessierte findet sich das in der Versionshistorie. Dieses Tool richtet sich nach bestem Wissen nach dem BMF Schreiben.

An dieser Stelle sei explizit erwähnt, dass ich trotzdem keine Haftung für die Anwendung dieses Programms übernehme. Es ist weder sichergestellt, dass ich es aktuell noch nutze (falls ich das Repo in Zukunft nicht mehr aktiv pflege), noch ob die tatsächliche Umsetzung des Programms gesetzlich zulässig ist. Issues und Pull Requests sind gerne gesehen.

Weitere Besonderheiten die sich so nicht im BMF-Schreiben wiederfinden, sind im folgenden aufgelistet.

Binance Referral Rewards (Referral System)

Bei Binance gibt es die Möglichkeit, andere Personen über einen Link zu werben. Bei jeder Transaktion der Person erhält man einen kleinen Anteil derer Gebühren als Reward gutgeschrieben. Die Einkünfte durch diese Rewards werden durch CoinTaxman als Einkünfte aus sonstigen Leistungen ausgewiesen und damit wie eine übliche Kunden-werben-Kunden-Prämie erfasst.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].