shadowmax31 / crypto_log Goto Github PK
View Code? Open in Web Editor NEWThis is a cli-tool to log and track the Cost Basis and Capital Gain when transacting with CryptoCurrency
License: GNU General Public License v2.0
This is a cli-tool to log and track the Cost Basis and Capital Gain when transacting with CryptoCurrency
License: GNU General Public License v2.0
TinyDB is slow.
I think I want to use my own simple file structure to manage the data. Something like, task warrior. This will make it a lot easier to manage the undos.
Now that, I know more about what's needed to make this application work, I need to rethink a structure
Use transactionExists
in transaction.py to check if a transaction already exists before printing it to the generated import file.
At the moment, to make sure transactions are not added twice, we only check if it exists in the buy or sell transaction. This adds transactions that already exist to the history when the CSV is imported. This is not wanted, because it adds junk to the EXPORT function
The generated import file should have a already exists section that shows the transaction that are in the database.
We should add a parameter to crypto.ini to specify the frequency at which we should refresh the prices for different crypto.
Each time the application is called, we could make a check to see when was the last call made to CoinMarketCap's api and if it has been long enough we refresh the prices and save them a table called "Price"
Add a way to import CSV files from:
The goal is to import multiple CSV files and call the right transactions (buy, sell or exchange).
Add comments to the code and refactor what should be written better
List of files to go through
Order the capital gain report by date first. At the moment, it's ordered by ticker and then by date.
Find a way to insert data in any order. At the moment, buys and sells have to be entered in the right order
Since we have to work with amounts that have many decimals (0.031235 btc), we should find a way to use the Decimal class for better accuracy;
Make better descriptions when generating transactions from CSVs
Dust conversions are basically taking a small amount of crypto (ETH, BTC, etc.) and converting it to CRO. This should be treated as an exchange transaction.
The issue is that dust conversions are generated in two (maybe more) rows in Crypto.Com's CSV and we process one line at a time when importing a CSV file. So, we cannot generate the exchange transaction.
It's also worth noting that the interface in Crypto.Com's app allows to select multiple cryptos in one dust conversion. I don't know how this would show in the CSV though, I only tested converting ETH to CRO.
Change the table structure.
Create a ticker table and put everything in it. With this change, we could remove the history table/class and loop through the ticker table to export all the useful data
Add support for prices over 1000.
In the CSV, 1000 has a comma (1,000). This should be supported when importing (crypto generate).
There should some help to explain how the project should be used
We should add a way to manage the capital gain from interests. Basically, all interests are considered to be a buy at 0$
Have a way to change the amount of crypto without changing the cost basis (would be useful to take into account the fees when transfering crypto between wallets, making it easier to go back down to a cost basis of 0 if you don't own any of a certain crypto)
If you say no to an undo, it still logs it as a completed command. This will cause issues when you export the current database and run the generated file. It will undo a transaction that you did not undo.
Maybe the export command should not use the undo history and instead it should generate the transactions from the existing data. It would make more sens this way
Right now, if a transaction fails for some reason, it is still logged in the history.
We should find a better way to track the history
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.