Stock Data Fetch & Graph
Mar 29, 2023
Tools: React, fetch(), Chart.js
Functionality
- select companies from React Select dropdown;
- retrieve data from Polygon.io API;
- graph closing price of stock for past 30 days.
Comments
The goal was to (1) fetch data in real-time and dynamically (dates and company ticker not hard-coded), (2) plot the received data onto a React Chart.js. Since I had already worked with Axios before, I implemented here the native fetch() method with its double promise — to experiment with something new. A short but enjoyable project!