jeev20 / CryptocurrencyAssetReporter

This robot returns the value of the crypto currency on the first day of the year. This can help in reporting taxes in Norway and may be other countries too. Thanks to Coingecko for an amazing free API.
MIT License
2 stars 0 forks source link

Crypto Asset Report - Tax Return

Why use this robot?

In Norway, the government mandates that al cryptocurrency holdings are reported in the yearly tax return statement. However, unlike the stock market or bank accounts, the value of cryptocurrencies are volatile. The requirement is that individuals report the value of the asset as of the 1st day of the new year. To do this manually is not worth the time, what if we can automate it?

Solution

Through this Robocorp Robot script, I have tried to make the process of calculating the portfolio value a little less difficult.

What does GetCryptoPortfolio.py script do?

What does tasts.robot script do?

Preconditions

Ensure you setup your VS Code and Robocorp extensions to be able to run this robot in attended mode. Clone this repository and ensure your RCC in VS Code and Robocorp extensions is connected to your python instance. VS Code and Robocorp extensions will parse the conda.yaml file to install all dependecies for this project using pip.

Running the script

Step 1. Copy or Clone the contents of this repository

Step 2. Open the project in VS Code and open the tasks.robot file

Step 3. Change the variables as required year (string), cryptoCurrencies (dictionary), inFiatCurrency (string)

*** Variables ***
${year}  2021
&{cryptoCurrencies}    Bitcoin=${2}  Cardano=${3000}   Ethereum=${23.093898}  Monero=${13}
${inFiatCurrency}  nok  # any fiat currency supported by CoinGecko

Step 4. Execute the tasks.robot file and the output files will then be found in this following relative path in the project.

/results/CryptoPortfolio.csv
/results/CryptoPortfolioPieChart.png
/results/CryptoPortfolioTreeMap.png
The resulting output csv: Date Cryptocurrency Position Price in NOK CryptoValue in NOK
01-01-2021 Bitcoin 2.0 249584.82 499169.64
01-01-2021 Cardano 3000.0 1.57 4710.0
01-01-2021 Ethereum 23.093898 6351.9 146690.13
01-01-2021 Monero 13.0 1347.75 17520.75

PieChart

TreeMapChart

Thanks to

Contributors