# Tradingeconomics — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Access real-time economic calendars, macroeconomic indicators, and commodity prices across global markets including G20 nations and emerging economies. Monitor historical charts, country-specific economic data, and the latest financial news to track economic trends and make informed investment decisions.

**Category:** Finance & Markets | **Website:** [tradingeconomics.com/](https://tradingeconomics.com/) | **Docs:** [parse.bot/marketplace/d6e4566e-9be9-4e6b-a6be-13ec7d90ab3a/tradingeconomics-com-api](https://parse.bot/marketplace/d6e4566e-9be9-4e6b-a6be-13ec7d90ab3a/tradingeconomics-com-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/tradingeconomics/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get calendar

Get economic calendar events with filters for country and date range. Returns scheduled and released economic data releases including actual values, forecasts, and impact levels. Each event carries a country code, event name, reported actual/previous/consensus/forecast values, and an impact rating (1=low, 2=medium, 3=high). When no date range is specified, returns this week's events.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `country` | string | No | Country slug or comma-separated list of country slugs to filter by (e.g., 'united-states' or 'united-states,germany') |
| `end_date` | string | No | End date in YYYY-MM-DD format |
| `start_date` | string | No | Start date in YYYY-MM-DD format |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/tradingeconomics/get-calendar \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"country":"<string>","end_date":"<string>","start_date":"<string>"}'
```

### Get commodities

Get current prices and daily changes for all commodities across categories (Energy, Metals, Agricultural, Industrial, Livestock, Index, Electricity). Returns each commodity's current price, intraday change, and performance over weekly, monthly, year-to-date, and year-over-year periods. No input parameters required.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/tradingeconomics/get-commodities \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get country indicators

Get a list of all economic indicators for a specific country with their latest values, previous values, and historical highs/lows. Returns a comprehensive snapshot of a country's economic health across all tracked metrics (GDP, inflation, unemployment, interest rates, trade balance, etc.).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `country` | string | Yes | Country slug (e.g., 'united-states', 'germany', 'india') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/tradingeconomics/get-country-indicators \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"country":"<string>"}'
```

### Get indicator details

Get comprehensive details for a specific indicator including metadata (actual, previous, highest, lowest values), full historical time-series data, forecasts, and related indicators. The history array contains chart series with data points as [value, unix_timestamp, null, date_string] tuples. The limit parameter controls how many historical data points to fetch from the time-series API.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `country` | string | Yes | Country slug (e.g., 'united-states', 'india', 'germany') |
| `indicator` | string | Yes | Indicator slug (e.g., 'gdp', 'inflation-cpi', 'unemployment-rate', 'interest-rate') |
| `limit` | integer | No | Number of historical data points to fetch |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/tradingeconomics/get-indicator-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"country":"<string>","indicator":"<string>","limit":"<integer>"}'
```

### Get news

Get the latest economic news and stream of updates. Optionally filter by country name. Returns up to 40 news articles with title, description, source author, country, category, importance level (0-2), and publication timestamp.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `country` | string | No | Country name to filter news (e.g., 'united states', 'germany'). Use spaces, not hyphens. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/tradingeconomics/get-news \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"country":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.