Open fedefailla18 opened 1 month ago
Objective: Enable users to visualize their crypto portfolio, incorporating both manually added holdings and dynamically calculated transactions.
/transaction/information
)Steps:
Steps:
Users
: Stores user information.Portfolios
: Stores portfolio details linked to users.Transactions
: Stores transaction details.Holdings
: Stores manually added and calculated holdings.Users
-> Portfolios
(One-to-Many)Portfolios
-> Transactions
(One-to-Many)Portfolios
-> Holdings
(One-to-Many)PortfolioView
: Main component displaying the portfolio.HoldingsTable
: Displays a table of current holdings.TransactionList
: Displays a list of transactions.This plan outlines a clear path to visualize the crypto portfolio, integrating both static holdings and dynamic transaction data.
Finish associating Transactions to holdings for Binance transactions. Now we need to store the rest of the fields calculated in CoinInformationFacade.
Linking Transaction with Holdings and Portfolio. https://github.com/fedefailla18/file-importer/pull/19
Finally here https://github.com/fedefailla18/file-importer/pull/23 we have the whole integration in the BE. Now when uploading a file the endpoint receives a path variable containing the portfolio name. From here if it does not exist, it's created and linked to the transactions. The endpoint is POST /transaction/upload/{{portfolio}}
.
Then to calculate holdings we can do it by portfolio or by symbol:
POST /transaction/information/all/{{portfolio}}
transactions associated to that portfolio are fetched and use to calculate the holding of each symbol. POST /transaction/information?symbol=:symbol
transactions of that symbol are fetched and processed as the previous bullet point.
Although we are doing this, we still need to open the chance to upload files from others portfolios. Once doing this we will be able to de-hardcode the CoinInformationService.setAndSaveHolding
set of the portfolio to any.There are still some improvements to do in the scope of this ticket so I will keep it open for the next iteration.
For the sake of users we need to be able to first save the transaction information (done in /transaction/information). Then, we need to identify transactions to its portfolio. Finally, this portfolio can be shown in a FE view.
Right now we support portoflio view only to holdings. This holdings are manually and static added by a user, we need to leverage this and the amount calculated for the transactions we need to add it here. This will allow us to use an already built platform and save up valuable time.