tradingeconomics
Trading Economics API
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- You must obtain an API key and secret from Trading Economics to authenticate and access the data.
- 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 · maintenance · safety
MIT (permissive) — 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.
last release 2026-07-08 (37 days) · last repo commit 2026-07-13 · 129 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 129,755 downloads/mo, #11,659 on PyPI
Alternatives
Verify before relying
pip install tradingeconomics
import tradingeconomics as te
te.login('key:secret')
te.getIndicatorData(country=['mexico', 'sweden'], output_type='df')- 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.
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 on it.
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
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.
You must obtain an API key and secret from Trading Economics to authenticate and access the data.
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')
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 packagespandaswebsocket-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 |
| Classifiers | 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 |
Evidence: tradingeconomics-4.5.11-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “stock market indexes api”
- tradingeconomicsProvides Python access to over 300,000 economic indicators, exchange…
- vnaiVnAI provides a Python interface for accessing Vietnamese stock…
- baostockBaoStock retrieves historical China stock market data and returns it…
Give your agent the search over MCP, or paste the wish link into any chat.
More Financial packages
statsmodels provides statistical models, inference methods, and descriptive statistics for Python, complementing scipy with regression, time series, discrete choice, survival analysis, and multivariate methods.
Install it if you need publication-quality statistical models, hypothesis tests, or time series analysis beyond what scipy or pandas provide.
Generates country- and subdivision-specific government holiday calendars on demand, supporting 250 country codes with optional language localization and holiday categories.
Fetches financial and market data from Yahoo Finance's public APIs, including ticker information, historical prices, and live streaming data.
However, do not use it for commercial applications or high-volume data collection without confirming compliance with Yahoo's terms of service.
Bokeh is an interactive visualization library that creates browser-based plots, dashboards, and data applications from Python code, with support for large and streaming datasets.
Install it if you need browser-based interactivity.
Parses, validates, and reformats standard numbers and codes across many countries and industries—tax IDs, bank accounts, identity numbers, VAT codes, and financial identifiers.
Install it if you validate or reformat standardized numbers.
Provides elementary financial functions (IRR, NPV, PMT, and others) that were deprecated and removed from NumPy, offering a dedicated replacement for financial calculations.
However, given the aging status (no releases since 2019) and unclear compatibility with modern Python and recent numpy versions, verify that it works with your target…
See also openbb-tradingeconomics · python-bcb · metatrader5 · tradingview-screener · tradingview-ta · alpha-vantage · spgci · openbb · quantecon · Nasdaq-Data-Link