This post discusses the fastest method to ingest Tiingo End-of-Day Stock API data. This will allow you to keep your database up-to-date in the fastest, and most efficient way that will also protect your Tiingo API usage limits.
Steps to keep your data up to date
For the fastest update of Tiingo End-of-Day (EOD) data, we recommend the following workflow.
1. Cycle through the tickers you need with our historical prices endpoint. E.g. https://api.tiingo.com/tiingo/daily/aapl/prices?startDate=1960-1-1
2. Once you have this data cached, you can query https://api.tiingo.com/tiingo/daily/prices to get the latest price values for the current day. If splitFactor != 1 or divCash > 0, then we recommend redownloading the entire price history from step 1 above. This is to ensure you get the latest adjusted prices.
This workflow means you only have to cycle through ticker histories once, and then you can use the delta to make minimal queries to keep your database up to date.
Conclusion and further optimizations
With these two steps, you can can minimize data requests. If you want further optimizations we recommend appending &format=csv to the queries above. This will allow for quicker downloads since file sizes will be lower. This concludes the fastest method to ingest Tiingo End-of-Day Stock API data and keep your data up-to-date!