--- id: tradingeconomics version: "4.5.11" license: MIT license_treatment: permissive maintenance: active --- # tradingeconomics — Trading Economics API License: permissive · Maintenance: active · Downloads: 129.8K/mo ## 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 above — 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 pip install tradingeconomics uv add tradingeconomics 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_current - Install friction: low - Maintenance: active - Downloads: 129.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags economic data api python, trading economics indicators, financial market data access, commodity prices api, exchange rates data, stock market indexes api, government bond yields data, financial-data, api-client, economic-indicators [View on SkillFed](https://skillfed.io/packages/tradingeconomics) · [View on PyPI](https://pypi.org/project/tradingeconomics/)