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:
Release files for tradingeconomics 4.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tradingeconomics-4.3.3.tar.gz | 38.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tradingeconomics-4.3.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 92.8 kB
Release files / tradingeconomics-4.3.3.tar.gz
| Download URL | tradingeconomics-4.3.3.tar.gz |
|---|---|
| Size | 38.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6e8ceeb8b6e5baf2cdc6913f4d51d1893715902a29e872f94b261ac022089887
|
|
BLAKE2b-256 checksum How to use checksums |
74343c83c9474de8d34894a197ca76d12070b633e14aab49a4270145c93ab172
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / tradingeconomics-4.3.3-py3-none-any.whl
| Download URL | tradingeconomics-4.3.3-py3-none-any.whl |
|---|---|
| Size | 54.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
db882c7899aa07b3c290d31e888fed1cc383959b32476df0faaba9454f7f924d
|
|
BLAKE2b-256 checksum How to use checksums |
f3da83fe2e9a2c16c8d573ab390f605ddb819aa6102062d6fda58c9df39f6c79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|