
ABSTRACT:
Stock Sync is an automation program designed using Python and SQLite. It uses some important methodologies of data science: data extraction, data visualisation and data analysis. It uses an external data source called Polygon.io API, an API platform that specialises in stock APIS. This program fetches data from an outside source, extracts data from it, parses it and then stores it in a database. Then, in a separate file, data is fetched from the database and displayed neatly and cleanly. Then we use a scheduler to fetch data after every 15 minutes when the NYSE market opens and fetches the data until it closes.
INTRODUCTION:
Stock Sync is a simple automation-based application that is used for stock analysis and visualisation purposes. This program is built on technologies like Python and SQLite. This is an exciting beginner-level application that can be further modified for more complex applications.
TOOLS AND TECHNOLOGIES:
The tools and technologies used for developing this application are as follows:
PROGRAM FLOW:
API_HANDLER:
In this file, I have used the urllib and JSON libraries for extracting data from the web through web scraping. I have used an external data source called Polygon.io API, which specialises in finance-based API and applications. I extracted a total of 54 major stocks and used a time delay of 12 seconds to bypass the limit of the API, which is 5 requests per minute.
DATABASE:
In this file, I created a database using the sqlite3 library. In this file, I also imported the function from the Api_handler file so that it can be used to insert data into the database.
.png?Expires=1762236489&Key-Pair-Id=K2V2TN6YBJQHTG&Signature=cWb5k2uqF0~q5G3ZTawekKOguc94KUZqynwnDLRjCIZgXZLp-s53-EYzfsueB1TKjyvsjuhqvrh9R8iNF7b4JvKssfP1iuV0ZH6mC0zlXfysFX~plVYv5~5flw-bkkzFvisa8xq~Jk4V2M9sGrLE2bJrggeLuibEaXxCmNdZ9z8Glqtnq9-rUTKADOWXVdcKa26xWAMjnYeMKlbmr6Gum6sx3SYFa2skqd1jKqTghNulsG7s5SfSdrBNIvwyBgvrIpJ9JEQXXEJ-VXBMt46Nc45b09RR9Lkvd2GQBS4rQoLcR5yYcPYgYpCOXLK3PEM1xVkCpg8rzh8la4DRl7pN0Q__)
.png?Expires=1762236489&Key-Pair-Id=K2V2TN6YBJQHTG&Signature=qV59MaE4bMN8coJa5ezh867oB9QMBrSzeJUTp5dlWLb~t0e~Ws55B9m63os7QCF65DiVas3SDCUGjFjeti~C7NOACJCwaiNXJpr~cWEkh64WAGEyT2~h4sD34IuHvLGhltEeJ7Z~myLHoh0DOxJuCIGNzTZv0k9RoWWwwfb4UvX~xlKWycK3aUMtTVJTyEoT7BGAqMwXH2d~wU8qti4n9AGcoro6wXeu0-d8cWHW~nFBM2B9fpqSxZPbmjSPm~6t8Xo04i4ilDalbZaVZWT4M~G1MJhwqIeng~XvVMmN0xWOgoapQkdhpobb~NZydVy7iz~JB9llnOrGAtR-rtcKqw__)
.png?Expires=1762236489&Key-Pair-Id=K2V2TN6YBJQHTG&Signature=egpSyqlqBo~UIUfjVYlRNkXuzW08HIwMICd-KpGZn-sghCBzbQUCAdF0DYKUBDWLk6lLGu21CCxRM~zwQbnAfO1Xr157PpNNJPlCSeGHnHsxviqxvyFksfR8VIkT8IFQv0W~av-70vfrQWfcv~PaUk0mK5BVTCew7ZNBm~8fUTbkYxbBp75xR05mg6HhxIdMA~bNaLM2fpu5Nj5Z25sifeOb6FfUUagoseSHLq-5YFCMAnC6uWRlA07gL1X4OTcGqKzkpWYcgGcUvEElc5KXIUoIBUQMN3pRhBcjoVq3GjPQQzEUUAwIwLnkTvit9Rfc7okUPoJSm~H9efC~hoBlew__)
CLOSING REMARKS:
This application is one of my complex and hardworking tasks. I admit that I had to rely on AI for some tasks because I was unfamiliar with them, but I understood each task and performed it myself, rather than just simple copy and paste.
Finally, I would like the community members to review my application, as I would highly appreciate it. Thank you for your time, and I am excited to learn more from you.
Program files:
GITHUB LINK:
https://github.com/h2005mirza/Stock-Sync