As a user
I want to see latest developments on the stock market.
In order to make informed decisions about my investments and stay updated on market trends.
Description
Acceptance Criteria
Stock market news are displayed on the reports page which is accessible via hamburger menu.
Stock market updates include key indices (e.g., S&P 500, NASDAQ, Dow Jones) and their percentage changes.
Provide a list of trending stocks with their performance details (e.g., price, percentage gain/loss).
The data refreshes periodically or provides a refresh button for manual updates.
Display the time of the last update to ensure users know the data's relevance.
Display error message when data fails to fetch.
Tasks
[ ] Create a feature branchfeature/stock-market-updates.
Backend
[ ] Set up API integration for stock market data:
Integrate with a stock market API (e.g., Alpha Vantage, Yahoo Finance, Finnhub).
Configure authentication and secure API keys in environment variables.
[ ] Implement endpoint for key indices and trending stocks:
Create a backend endpoint to fetch and process data for key indices (S&P 500, NASDAQ, Dow Jones) and trending stocks.
Format the data to include price, percentage change, and other relevant details.
[ ] Error handling and retries:
Add logic to handle API failures, such as retries and fallback messages.
[ ] Add last update timestamp:
Include the time of the last successful data fetch in the API response.
Frontend
[ ] Create a Stock Market Section on the Reports Page:
Update the Reports page with a new section for displaying stock market updates.
Ensure the section is accessible via the hamburger menu.
[ ] Build UI for indices and trending stocks:
Design and implement a layout to show indices with their values and percentage changes.
Create a list for trending stocks, displaying price and percentage gain/loss.
[ ] Add a refresh button for manual updates:
Place a refresh button in the UI to allow users to manually fetch the latest data.
Connect the button to the backend refresh API.
[ ] Implement data refresh timer:
Set up an auto-refresh mechanism that periodically fetches new data.
Allow the refresh interval to be configurable.
[ ] Display the last update time:
Show the last update time in a user-friendly format on the UI.
[ ] Handle error states:
Display a user-friendly error message if the data fetch fails.
Provide a retry option in the error message UI.
[ ] Manage data state in the frontend:
Store fetched stock market data in a state management system.
Ensure the UI automatically updates when new data is received.
Value Proposition
As a
user
I want tosee latest developments on the stock market
. In order tomake informed decisions about my investments and stay updated on market trends.
Description
Acceptance Criteria
Tasks
feature/stock-market-updates
.Backend
Frontend