Data Sourcing
I first have to figure out how I’m going to get the stock data required so I can match the users input to known stocks. My first thought was using an API like yfinance (yahoo finance’s API) however I quickly realized I’d have to perform too many API requests since I’d have to query the API in real time based on what the user is typing. It would also be significantly slower than an offline solution since the frontend would have to perform a request to the backend which then would have to perform a request to the API. The better way is to reduce online calls to services and use an offline solution. This means downloading the data to the server and then doing the matching/indexing internally. I was able to find a JSON file from the official SEC website containing 9998 publicly listed companies (it’s also very up to date from what I could tell). I’m going to load all stock data into a properly indexed database table and then perform queries against it using an indexed text search.