Photo by Aditya Vyas on Unsplash

A Simple Way to Download Financial Data from Investing.com in Python

Using the investpy library

Eryk Lewinson
Published in
6 min readOct 17, 2021

--

I have recently come across another interesting source of financial data — Investing.com. In short, it is a financial platform and news website. Actually, Wikipedia names it as “one of the top three global financial websites in the world”. After poking around for a bit, I found that there is a handy Python library — investpy — which allows us to easily download most of the information available there.

In the library’s GitHub repository, we can read that the website offers an impressive trove of recent and historical data about various asset classes. We can access information about:

  • 39952 stocks,
  • 82221 funds,
  • 11403 ETFs,
  • 2029 currency crosses,
  • 7797 indices,
  • 688 bonds,
  • 66 commodities,
  • 250 certificates,
  • 4697 cryptocurrencies.

Wow, that is quite a lot. And all of that is available for free. In this article, I will briefly describe what kind of data we can download and how to do it.

Setup

--

--

Eryk Lewinson
Geek Culture

Data Scientist, quantitative finance, gamer. My latest book - Python for Finance Cookbook 2nd ed: https://t.ly/WHHP