alvarobartt / investpy

Financial Data Extraction from Investing.com with Python
https://investpy.readthedocs.io/
MIT License
1.59k stars 375 forks source link

Singapore Index Futures (SGX Nifty 50 Futures) data #497

Open srinivasakumar-a opened 2 years ago

srinivasakumar-a commented 2 years ago

How to pull SGX Nifty 50 Futures data into python? I tried the below code:

investpy.get_index_historical_data(index='SGX Nifty 50 Futures',
                                            country='singapore',
                                            from_date=yesterday,
                                            to_date=today)
bitcloudx commented 2 years ago

You have to enter actual dates I believe. As for the proper index name you can find them all in the csv file here. Fair warning alot of them do not work and will rase a index error. https://github.com/alvarobartt/investpy/blob/master/investpy/resources/indices.csv