skillfed

tradingeconomics

Trading Economics API

tradingeconomics v4.5.11 129.8K downloads/30d#11,659 on PyPI129
Permissive license MIT Active released

What it is and what it does

tradingeconomics is a Python client library for the Trading Economics API, a financial data service offering access to a large catalog of economic indicators, market data, and commodity prices. It wraps HTTP requests to Trading Economics' backend, handling authentication and response parsing so you can query indicators by country, fetch market data by symbol, retrieve calendar events, and pull financial statements—all with optional output formatting to pandas DataFrames, CSV, or JSON.

The package is designed for developers building financial dashboards, research tools, or data pipelines that need reliable access to macroeconomic and market data. It depends on pandas for data manipulation and websocket-client for underlying connectivity, and runs on modern Python versions from 3.8 onward. Authentication is required upfront via an API key, and the library provides convenience methods for common queries rather than a raw HTTP interface.

Use it for:

  • Build a financial dashboard that displays live economic indicators and commodity prices for multiple countries.
  • Backtest trading strategies using historical exchange rates and stock index data exported to pandas DataFrames.
  • Feed economic calendar events into a custom alerting system to trigger notifications on key releases.
  • Export bond yields and interest rates to CSV for econometric modeling or spreadsheet analysis.
  • Populate a research database with historical commodity prices and market indexes for quantitative analysis.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides Python access to over 300,000 economic indicators, exchange rates, stock indexes, bond yields, and commodity prices from Trading Economics' databases, with support for XML, CSV, and JSON export.

Yes. The package is actively maintained, has low install friction, carries no known vulnerabilities, and offers permissive MIT licensing. Install it if you need programmatic access to Trading Economics' economic and market data; the main prerequisite is obtaining an API key from Trading Economics.

Install

tradingeconomics on PyPI

pip

pip install tradingeconomics

uv

uv add tradingeconomics

poetry

poetry add tradingeconomics

Installing tradingeconomics

Before you install

Low install friction with just two runtime dependencies (pandas and websocket-client). Package is actively maintained with a recent release 37 days ago and steady commit activity; supports Python 3.8 through 3.14.

License in practice

MIT license is permissive, allowing commercial and private use with minimal restrictions—you may use, modify, and distribute the package freely provided you include the license notice.

Quickstart

pip install tradingeconomics

import tradingeconomics as te
te.login('key:secret')
te.getIndicatorData(country=['mexico', 'sweden'], output_type='df')

You must obtain an API key and secret from Trading Economics to authenticate and access the data.

Verify before relying

  • Whether the websocket-client dependency is used for real-time streaming or only as a fallback.
  • Rate limits or throttling policies for API requests.
  • Whether all 300,000+ indicators are accessible with a standard API key or require premium tier.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 2 — pandas, websocket-client
Maintenance actively maintained — 37 days since the last release
Last repo commit
First released
Downloads 129,755/month — #11,659 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: tradingeconomics-4.5.11-py3-none-any.whl

Keywords: tradingeconomics, data

Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Office/Business :: Financial :: Point-Of-Sale

Tags

economic data api pythontrading economics indicatorsfinancial market data accesscommodity prices apiexchange rates datastock market indexes apigovernment bond yields data
financial-dataapi-clienteconomic-indicators

More Point-Of-Sale packages