🤏🏻 Use `investiny` while we fix `investpy`!

See original GitHub issue

Hi everyone, I’m Alvaro Bartolome, ML Engineer, open source developer, and the creator of investpy. As many of you may already know, Investing.com which is the data source that investpy uses has recently changed its APIs as well as the protection of those with Cloudflare, which means that the data is not accessible the same way as before. I and other community members are working actively on solving this issue and looking for alternatives to pull the data from Investing.com.

Most of the solutions proposed by the community worked at some point, but are now discontinued or no longer working, but one solution proposed by @ramakrishnamekala129 at https://github.com/alvarobartt/investpy/issues/610 seems to be working fine and consistently.

So on, I’ve decided to develop investiny in the meantime, so that everyone can pull the data from Investing.com but in a simpler and faster way. Also as Investing.com is changing so many things lately, I decided to create a new repository named investiny so as to be easily adaptative to changes. Note that investiny is not a replacement for investpy, just an intermediate solution in the meantime while we solve the current issues with investpy.

I’d like all of you to star investiny and contribute to it, as the code is much simpler and easy to understand, but it obviously has less functionality, but we’ll get there at some point. Also showing me support by starring, liking, retweeting, etc. is much appreciated.

Thanks, everyone! 🤗

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:8
  • Comments:34 (4 by maintainers)

github_iconTop GitHub Comments

8reactions
webdevzillacommented, Oct 19, 2022

@alvarobartt Not quite sure why there’s hesitation to use my solution for now.

Here’s the API I built specifically for this community: http://api.scraperlink.com/investpy/

Using it in your scripts is just a matter of prefixing your current fetch requests with this: http://api.scraperlink.com/investpy/?email=your@email.com&url=

Example:

http://api.scraperlink.com/investpy/?email=your@email.com&url=https%3A%2F%2Fapi.investing.com%2Fapi%2Ffinancialdata%2Fhistorical%2F7%3Fstart-date%3D2022-09-29%26end-date%3D2022-09-29%26time-frame%3DDaily%26add-missing-rows%3Dfalse

I have also added another option that supports historical data for stocks, cryptos, currencies and bonds:

Basics:
* email= So we can send important updates
* type= historical_data
* products=cryptos,currency_crosses,stocks,bonds
* from_date=m/d/Y
* to_date=m/d/Y
- time_frame=Daily,Monthly,Weekly

stocks:
- country= (if not using 'id')
* id=, symbol= or name=
Example: http://api.scraperlink.com/investpy/?email=your@email.com&type=historical_data&product=stocks&country=united%20states&symbol=TSLA&from_date=09/27/2022&to_date=09/28/2022

cryptos:
* id=, symbol= or name=
Example: http://api.scraperlink.com/investpy/?email=your@email.com&type=historical_data&product=cryptos&symbol=BTC&from_date=09/27/2022&to_date=09/28/2022

currency_crosses:
* id= or name=
Example: http://api.scraperlink.com/investpy/?email=your@email.com&type=historical_data&product=currency_crosses&name=USD/CAD&from_date=09/27/2022&to_date=09/28/2022

bonds:
- country= (if not using 'id')
* id= or name=
Example: http://api.scraperlink.com/investpy/?email=your@email.com&type=historical_data&product=bonds&from_date=01/01/2022&to_date=09/28/2022&time_frame=Monthly&country=india&name=India%2010Y

* - Required 

If anyone needs anything else added, it won’t take me more than a few minutes to do it.

It works perfectly fine and is better than nothing.

2reactions
webdevzillacommented, Dec 8, 2022

There wouldn’t be a way for me to control where they’re used. My proxy pool would get abused to oblivion.

The solution I’ve provided is 100% free and I can presumably make it work forever. In fact, I will probably add backups to it as well, so that even if Investing.com no longer exists, the API will continue working seamlessly.

I need this for my own purposes so there’s no way I would let it die.

Read more comments on GitHub >

github_iconTop Results From Across the Web

💻 Usage - investpy
investpy allows the user to download both recent and historical data from any financial product indexed (stocks, funds, ETFs, currency crosses, certificates, ...
Read more >
investpy - Bountysource
As many of you may already know, Investing.com which is the data source that investpy uses has recently changed its APIs as well...
Read more >
investpy Documentation - Read the Docs
investpy is a Python package to retrieve data from Investing.com, which provides data retrieval from up to 39952.
Read more >
investiny - PyPI
investpy ` but made tiny. ... In the meantime, anyone can use investiny as I'm actively working on ... investpy uses Investing.com's APIs...
Read more >
Stock historical data with Investpy - python - Stack Overflow
import investpy as inv import pandas as pd stocks = ["WEGE3", "JHSF3"] dfs = pd.DataFrame() for stock in stocks: df ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found