Skip to main content

Trading Economics API

The Trading Economics Python package provides direct access to over 300,000 economic indicators, exchange rates, stock market indexes, government bond yields, and commodity prices. This package offers various request methods to query the Trading Economics databases and supports exporting data in XML, CSV, or JSON format. The API can be used to feed custom-developed applications, public websites, or off-the-shelf software.

Installation

You can install the package using pip:

  • pip install tradingeconomics

Authentication

To use the Trading Economics API, you need to authenticate by providing your API key and secret:

  • import tradingeconomics as te

  • te.login(‘key:secret’)

Sample Usage

Here are some examples of how to use the Trading Economics Python package:

  • 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’)

GitHub Examples

You can find additional examples and usage instructions in the GitHub repository:

Documentation

For detailed documentation and API reference, please visit the Trading Economics API documentation:

Metadata

Release files for tradingeconomics 4.5.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tradingeconomics 4.5.11
File Size Uploaded Provenance Actions
tradingeconomics-4.5.11.tar.gz 41.9 kB Without provenance Details for tradingeconomics-4.5.11.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tradingeconomics 4.5.11
File Interpreter ABI Platform Actions
tradingeconomics-4.5.11-py3-none-any.whl Python 3 none any Details for tradingeconomics-4.5.11-py3-none-any.whl

Total release size: 98.9 kB

Release files / tradingeconomics-4.5.11.tar.gz

Download URL tradingeconomics-4.5.11.tar.gz
Size 41.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0e6da356166e88a7975041143bbf953ddbc8a0b0d791d02984b6fd214847d111
BLAKE2b-256 checksum
How to use checksums
64de496af27bdc8435f7e3cec7d71dcecc6b5e7c6a180ae52c2971022534ba16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Release files / tradingeconomics-4.5.11-py3-none-any.whl

Download URL tradingeconomics-4.5.11-py3-none-any.whl
Size 57.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7bdaa9bf9e0bd8f9aa60bbb1beeec9bb9eaf2e8e21e65b1d407891afb9232671
BLAKE2b-256 checksum
How to use checksums
4f3c1bdc0464457450224d5943ddc6b7ea169eb6aa564ea7d0499c590517d2b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Security for tradingeconomics 4.5.11

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

4.5.11 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page