My first REACT app (Pros & Cons)
Published: 2023-12-14 15:30:09


What’s up fellow devs! I want to chat about my experience using Polygon.io's open API for stocks in React app development. It's been a bit like riding a rollercoaster in the stock market, with some ups and downs. Let me break it down for you.
Exploring the Stock Market with Polygon.io 
1. Data Magic:
I got into using Polygon.io's API because it promised real-time stock data that provides a sufficient amount of detailed information about each stock.
2. Charts and Graphs:
React is already good at making things look cool, but with Polygon.io's API, I could create dynamic stock charts and graphs. It wasn't just about displaying data; it was about creating engaging experiences for users. 
3. Saving Money:
For $29, I was able to access a ton of data necessary for building my app. As a budget-conscious developer, the cost-effective side of using Polygon.io's API was a big win. There were a few free stock APIs however, there was usually some downside like lack of real-time data, no private keys, or the cost was even higher. 
Navigating Stock Market Challenges 
1. Nesting of data:
While there was a plethora of data, I found it quite difficult to obtain specific types of data nested in objects. One of the issues with this was having to run multiple fetches that made my code a bit confusing and often led to it breaking. Remember, I’m a new developer so I’m sure there is a more efficient way of fetching/obtaining nested data but unfortunately I’m not there yet. 
2. Lack of instructions:
For someone who is pretty familiar with financial data, I thought the API document lacked indication of what data is being represented by what attribute. For example, a lot of the attributes are labeled with one letter, and the explanation was pretty vague. 
3. Adapting to Changes:
The stock market isn't static, and neither is its data. Polygon.io's API was like a treasure chest, but I had to stay nimble to adapt my React components to any changes in the data landscape. A lot of the aggregates required functions to select specific dates or time windows, which made it difficult to build as a beginner. It would have been great if they mentioned or provided a link to the function options that would assist with obtaining the aggregate data. 
4. Speed Bumps and Limits:
Just like stocks have their limits, so do APIs. I had to manage these limits and navigate any speed bumps to keep my React app performing at its best. For example, they say the data is “real-time” however, the earliest stock data I could pull was from yesterday’s close. Additionally, the graph data they provided was great but it didn’t allow me to adjust the size of the graph (or at least I couldn’t figure out how to). 
Conclusion: The Stocked Experience 
In the end, using Polygon.io's open API with React felt like a rollercoaster ride through the stock market – thrilling, a bit unpredictable, but incredibly rewarding. The magic of data, quick development, and affordable price came with a dose of vigilance, re-reading, and adaptability to changes. React and Polygon.io's API together made creating a lively stock market app an adventure I'm excited to share with fellow devs.