Closed ronilbhatia closed 5 years ago
Hey Cynthia,
I have now incorporated all aspects of the Asset/Stock detail including interactive charts to display 1D, 1W, 1M, 3M, 1Y, and 5Y data using real-time price data pulled from the AlphaVantage API. Additionally I am pulling information for the About section of the stock from the Intrinio API - note that as of right now only the CEO, HQ Location, and Employees #s are real data, while the other portions (Founded, Market Cap, PE Ratio, Dividend Yield, Average Volume) are hard-coded and will appear the same on any stock page.
One issue right now is that sometimes the API calls to AlphaVantage fail and result in undefined data being returned which breaks the page and nothing renders - I am working on solving this right now and have a question open to talk it through with a TA as it's something I've been pretty stuck on. Usually the API won't be down for more than 30 seconds and if you refresh or try to navigate to a stock page with a different Ticker it will eventually work, and I can typically navigate to about 5 or 6 different stock pages before it breaks again. I would ask that once you get to a page that works you review based on that, as I try to resolve the issue with the failed API call (which I have left unchecked for now).
To test out the functionality, once you are in Heroku and demo logged-in you can navigate to this link:
https://easy-trade.herokuapp.com/#/stocks/AAPL
You may modify the ticker at the end to any valid NYSE or NASDAQ ticker (e.g. MSFT, NFLX, TWTR, SBUX, BLUE, AMZN, FB). Like I said, unfortunately it's not completely bug-free at the moment, but hopefully once you get to a page that is fully loaded you can review the aspects above that I have checked off. Thanks!
UPDATE: Fixed the bug - basically the API gets mad when too many requests are made so I've updated it to handle this by waiting 5 seconds and trying the request again - this results in a slow load time, but the page will eventually load. Given that I'm using a free API I think it's about as good as it will get for now - let me know if you are okay with this or have a better solution for how I might work around this.
[x] Consider styling the articles more similarly to Robinhood.
[x] watch out for the padding of long articles (yahoo article)
I fixed the styling of news articles to match Robinhood's more closely. Looks a lot cleaner now.