Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify custom buy price #26

Open
OnlyOnePro opened this issue Apr 2, 2022 · 1 comment
Open

Specify custom buy price #26

OnlyOnePro opened this issue Apr 2, 2022 · 1 comment
Assignees
Projects

Comments

@OnlyOnePro
Copy link
Contributor

Currently when you register a new purchase, if the day you are registering the purchase is a previous day; the app takes the average of the price of the coin that day and writes it as the purchase price.
ATM, some of my purchases in the portfolio are flagged as losses thanks to this.

Describe the solution you'd like:
If you go into the coin page and edit a registry inside it, you should be able to modify the purchase price of the coin. It could be a good idea to make it editable by default and when the user specifies the date of purchase of the coin, launch a query to CoinGecko to specify the average of the coin that day as the default price (Right now it only launches this query when you add the Fiat invested amount, it should also launch this query when the DatePicker component changes the selected date).

Additional context:
No additional context

@ismaelestalayo ismaelestalayo self-assigned this Apr 3, 2022
@ismaelestalayo ismaelestalayo added this to To do in 6.X roadmap via automation Apr 3, 2022
@ismaelestalayo
Copy link
Owner

The current way of calculating the "buy price" of a purchase is by simply dividing the invested quantity by the amount of the asset bought (it does not get the price of the coin at the time of the purchase):

priceBought = InvestedQty / CryptoQty


Replying to your comment, yes, I do plan to add a way to manually set the purchase price of an asset. However, either the quantity or the cost of the purchase would be then calculated automatically, because the three of them must retain a relation.

My innitial thought is to let the user input the quantity and price, and calculate the cost accordingly (with fees added to it).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To do
Development

No branches or pull requests

2 participants