maybe
maybe copied to clipboard
Manually input + automatically track US stocks
Currently we have the ability to manually enter the value of any asset (and then you can manually add updated values).
What need to add support for is entering a particular stock and then tracking the ongoing value of it.
For now, due to data sourcing, this would be restricted to the US stock market.
Data to input:
- Stock
- Number of shares
- Cost basis (optional)
This will be the basis for allowing users to import CSV files of their various holdings, but that specific functionality is outside the scope of this issue.
The backend essentially already supports this as we were importing this data via Plaid, but there's a current Issue to clean this up specifically for manual usage: #166
So, a lot of this (maybe most?) is essentially building the UI/UX to input the individual stocks.
Here's a rough mockup of potential UI.
- Select an existing manual investment account (or create a new one).
- Enter a stock symbol (though should probably pull from a database list of these so you can't just enter any random string)
- Set the purchase date, total purchase value (cost basis) and the number of shares
From there, Maybe would then track the value of that investment automatically.
Deliverables:
- UI for adding a manual investment account — Would use the existing "Investment" block in the modal, where you'd either pick an existing account or add a new one.
- UI for adding the stock — Should be a "search to select" UI for pulling from stock listing (Database:
Security
) - Creating the appropriate "transaction" for adding the stock.
- UI for removing/selling the stock
- Create the appropriate "transaction" for removing the stock.
Bounty
There is a $250 bounty for this.
For now, due to data sourcing, this would be restricted to the US stock market
What would be the source for US stocks ? What about ETFs ? What are the requirements for a source ?
- Stock
Thinking ahead for outside of US. What's a stock ? A ticker ? a ISIN code ? Both ? A ISIN code and a currency ?
What would be the source for US stocks ? What about ETFs ?
Currently the app is using Polygon.io, which has all data for all securities in the US market (stocks, ETFs, etc). Highly recommend using that as they have a free plan for individual use.
Thinking ahead for outside of US. What's a stock ? A ticker ? a ISIN code ? Both ? A ISIN code and a currency ?
We likely need to do a bit of research in this regard to see what international standard there is (if any). On the surface Symbol + Exchange should be a unique identifier available everywhere, but again...need to do some digging there.
https://www.alphavantage.co seems to have a free plan and some international coverage (LVMH in Paris MC.PAR is in for example)
https://www.alphavantage.co seems to have a free plan and some international coverage (LVMH in Paris MC.PAR is in for example)
We'll avoid AlphaVantage at all cost. Our experience with them as a business was...less than great.
Yahoo Finance can be great alternative, it's available for free on Rapid-API. Updating the stock prices automatically can be achieved by setting up a cronjob for saving the close price value for all the manually entered stocks and updating them after market closes, depending upon user's location. YF has data for almost every major region.
/bounty $250
💎 $250 bounty created by maybe-finance
🙋 If you start working on this, comment /attempt #131
along with your implementation plan
👉 To claim this bounty, submit a pull request that includes the text /claim #131
somewhere in its body
📝 Before proceeding, please make sure you can receive payouts in your country
💵 Payment arrives in your account 2-5 days after the bounty is rewarded
💯 You keep 100% of the bounty award
🙏 Thank you for contributing to maybe-finance/maybe!
👉 Add a bounty • Share on socials
Attempt | Started (GMT+0) | Solution |
---|---|---|
🟢 @bskinny129 | Jan 19, 2024, 5:37:22 PM | WIP |
🟢 @karan0handa | Jan 19, 2024, 7:43:03 PM | #215 |
I might take a crack at this one. A couple of follow up questions:
-
"Enter a stock symbol (though should probably pull from a database list of these so you can't just enter any random string)". Is this what the Security table is tracking?
-
Does this bounty need to update the list of eligible Security s?
-
Is there any consideration for the user's region as far as what Security s show?
-
Is there any on-going update as part of this, or just the UI? For example, what about a stock split?
@bskinny129 Great questions!
- Yes, Security is the centralized list of stocks.
- No, this is just doing a read on what's in the Security table.
- In my head...yes. (Basically only pulling from exchanges that are available in the user's "country" they pick during signup") But maybe there's a use case that conflicts with that?
- Don't worry about that in the scope of this task.
Well I think this is going to require more backend work than I have time for right now.
I did step 1 and will submit a PR. If it is worthwhile, a partial bounty is appreciated, but I understand if that's not the goal. I just don't have time to dig into the rest right now, so someone else can go for it.
Sure. I'll go for it (didn't finish the next day)
@Shpigford Just to clarify, stocks should be kept as holdings in an account right?
@karan0handa Any updates on this? Would love to take this up. Reaching out cuz I don't wanna highjack your attempt at this. Please let me know
Yes. Have made progress on this. PR coming up in a bit.
@karan0handa: Your claim has been rewarded! 👉 Complete your Algora onboarding to collect the bounty.