The Trading Economics Application Python package provides direct access to millions of time series with economic data, financial markets quotes, commodity prices, crypto currencies data and much more. It also allows you to query Trading Economics real-time economic calendar and to subscribe to updates.
pip install tradingeconomicsInstall the latest version directly from GitHub
git clone https://github.com/tradingeconomics/tradingeconomics-python.git
cd tradingeconomics-python
python setup.py installIn command window launch python and type
import tradingeconomics as te
te.login('guest:guest')Please replace guest:guest with your API key or we will be returning sample data.
te.getCalendarData()
te.getIndicatorData(country=['mexico', 'sweden'], output_type='df')
te.getMarketsData(marketsField = 'commodities')
te.getMarketsBySymbol(symbols='aapl:us')
te.getFinancialsData(symbol = 'aapl:us', output_type = 'df')https://github.com/tradingeconomics/tradingeconomics-python/tree/main/examples
Try our python interface in a container without installing anything
docker run -it --name te-python tradingeconomics-python:latest