alvarobartt / investiny

🤏🏻 `investpy` but made tiny
https://alvarobartt.github.io/investiny
MIT License
301 stars 36 forks source link

Send asynchronous requests to tvc6.investing.com to improve performance #42

Open alvarobartt opened 1 year ago

alvarobartt commented 1 year ago

In order to improve investiny's performance when retrieving historical data from Investing.com when the specified intervals imply retrieving data greater than 5000 points, we'll be using httpx with asyncio so as to make sure that those requests are run asynchronously rather than inside a for-loop.

We'll run a simple benchmark once done so as to compare both approaches to see which one performs better.

More information at https://www.twilio.com/blog/asynchronous-http-requests-in-python-with-httpx-and-asyncio courtesy of @sagnew