There are many ways to build a stock screening app. Many API’s to choose from, out of ease of access and for completely free you can use pandas-datereader. However the using pandas datereader, you will be webscrapping this data which comes at a great cost of speed when you start looping through hundreds of stocks. Although it still stands as a great way to start playing with stock data.

Connecting to the Finance API’s (polygon.io)

Connected to API’s normally stay the same, whether you are connected for stock data or whatever else, normally this hinges on having a secret key. This secret key tells the service provider of the API whether the account trying to pull data has permissions to do so, and what other permissions this account may have. Some of these finance API’s will allow you to pull data for free but allow only X amount of calls per second/minute. Some have paid teirs that allow you to unlock unlimited API calls every minute, here for this application I elected to use polygon.io. For a video instruction on how to connect to Polygon.io and get basic stock data I posted a video on YouTube

Connecting to other API’s other than polygon.io

I decided to make a video, as my use with the alpaca paper market trading api has increased. In order to show this I made another video to demonstrate the similarities between all market data api options.

Utilizing the Stock Data with other Libraries

Its one objective to get data from an API, its another objective to then use this data somewhere else. To show an example of a simple fun project you can do with this data, Plotly allows us to create our own version of tradingview and make our own charts. You can find the video I made on this subject here

Learning Flask to make a web based python application!

Between the many options like Django, Flask, and FastAPI, here I elected to go with Flask as it not only seemed the easiest to get the ground started but there looked to be a good community behind it that would help out. Django also has a wildy big community and is more open sourced however I did not learn about it until after started with Flask. At the time of making this I elected not to go with FastAPI due to its new nature and lack of community posts in case I got into a hitch. After playing around with flask for many days and learning the basics from basic web page blueprints, to login managers and adding a database to it. I again made a video to show the process of starting a Flask application.

What even is the goal?!?

Well there isn’t one solid plan with a stock application. This was more a test to see if I could put together a live site utilizing Flask and stock API’s. Currently we are working on methods of sorting through stocks and applying different values to them in order to detect different potential trades. The future plan ahead is to connect this with a paper wallet to allow the bot to flag its own conditions and buy and sell by itself. This is a far off future goal but one that can be completed with slow work on it over time. Updates on this can be found here or on the site itself.