Context endpoint
Official datasets
Fiscal, balance-of-payments, auction and official price tables, beyond the headline releases.
An active Individual subscription and API key are required for every request.
curl -H "X-API-Key: YOUR_API_KEY" \
"https://api.fxmacrodata.com/v1/financial_prices/usd"
import os
import requests
response = requests.get(
"https://api.fxmacrodata.com/v1/financial_prices/usd",
headers={"X-API-Key": os.environ["FXMACRODATA_API_KEY"]},
timeout=30,
)
response.raise_for_status()
print(response.json())
const response = await fetch("https://api.fxmacrodata.com/v1/financial_prices/usd", {
headers: { "X-API-Key": process.env.FXMACRODATA_API_KEY },
});
const payload = await response.json();
console.log(payload);
What it can do
4 routes in this endpoint
Official financial prices and yield curves
Use for official government bond, bill, auction, overnight-rate and yield-curve observations published by each currency's treasury or central bank, filtered by source, instrument, measure and date.
GET/v1/nativeNative source definitions
List source definitions for gold reserves and custody, Treasury financing and holdings, and EIA physical energy reports. Query a source and year to check available observations.
GET/v1/native/{source}Reserves, Treasury and energy history
Retrieve one source and observation year, with dimension filters and pagination. Stock levels, flows, ownership, custody and regional measures remain separate.
POST/v1/research/panelBuild a panel of values known at each decision time
Build a panel of values known at each decision time
Reference
Parameters and response fields
GET /v1/financial_prices/{currency} Official financial prices and yield curves
An active Individual subscription and API key are required for every request.
Financial observations from governments, central banks and exchanges. Filter by source, issuer, instrument or measure. Exchange-traded fund closes and volumes use the listing's trading session and quote currency. Source attribution and licence conditions accompany the data. Empty coverage means no observations are available yet.
Parameters
| Name | In | Type | Details |
|---|---|---|---|
| currencyRequired | path | string | |
| source | query | string | |
| start_date | query | date | |
| end_date | query | date | |
| measure | query | string | |
| instrument_id | query | string | |
| issuer | query | string | |
| limit | query | integer | Default: 100. |
| offset | query | integer | Default: 0. |
| api_key | query | string | Deprecated: legacy query-string API key. Still accepted so existing integrations keep working, but new integrations must send the key in the X-API-Key header (or Authorization: Bearer). A key is required for non-USD, paid-only, or full-history requests. Responses to requests authenticated this way carry a Deprecation header. |
| lang | query | string | Optional language for names and labels, for example es or pt-BR. A regional tag falls back to its base language, and a language that is not yet available returns English with Content-Language: en. Translated fields keep the English text in <field>_original and add a <field>_localized flag. Slugs, field names, codes, dates and values never change. Omit it for English. |
Response fields
| Field | Type | Details |
|---|---|---|
| currency | string | |
| start_date | string | |
| end_date | string | |
| sources[] | object[] | |
| sources[].reuse_status | string | Documented source terms, a government publication with no stated reuse terms, restricted use, or unresolved; source attribution is not a redistribution grant. |
| sources[].id | string | |
| sources[].currency | string | |
| sources[].publisher | string | |
| sources[].url | string | |
| sources[].license_url | string | |
| sources[].attribution | string | |
| sources[].frequency | string | |
| sources[].publication_frequency | string | |
| sources[].history_start | string | |
| sources[].measures[] | string[] | |
| sources[].dataset_name | string | |
| sources[].license | string | |
| sources[].reuse_conditions | string | |
| coverage[] | object[] | |
| coverage[].source_id | string | |
| coverage[].available | boolean | Whether observations are available for this source; a listed source without observations is not yet available. |
| coverage[].first_observation | string | |
| coverage[].last_observation | string | |
| coverage[].last_updated | string | |
| coverage[].source_accessed_at | string | |
| pagination | object | |
| pagination.limit | integer | |
| pagination.offset | integer | |
| pagination.returned_count | integer | |
| pagination.total_count | integer | |
| pagination.has_more | boolean | |
| pagination.next_offset | integer | |
| data[] | object[] | |
| data[].observation_id | string | Stable identity of the source, observation date, instrument and quote dimensions. |
| data[].source_id | string | |
| data[].date | string | Source observation date; not an inferred publication date. |
GET /v1/native Native source definitions
An active Individual subscription and API key are required for every request.
Parameters
| Name | In | Type | Details |
|---|---|---|---|
| api_key | query | string | Deprecated: legacy query-string API key. Still accepted so existing integrations keep working, but new integrations must send the key in the X-API-Key header (or Authorization: Bearer). A key is required for non-USD, paid-only, or full-history requests. Responses to requests authenticated this way carry a Deprecation header. |
GET /v1/native/{source} Reserves, Treasury and energy history
An active Individual subscription and API key are required for every request.
Persisted observations for one source and year. Ownership and custody, holdings and flows, and auction dates remain separate. Historical publication times can be unknown.
Parameters
| Name | In | Type | Details |
|---|---|---|---|
| sourceRequired | path | string | |
| yearRequired | query | integer | |
| measure | query | string | |
| holder_country_code | query | string | |
| ownership_basis | query | string | |
| maturity | query | string | |
| account_type | query | string | |
| region | query | string | |
| product | query | string | |
| limit | query | integer | Default: 100. |
| offset | query | integer | Default: 0. |
| order | query | string | Default: asc. |
| api_key | query | string | Deprecated: legacy query-string API key. Still accepted so existing integrations keep working, but new integrations must send the key in the X-API-Key header (or Authorization: Bearer). A key is required for non-USD, paid-only, or full-history requests. Responses to requests authenticated this way carry a Deprecation header. |
POST /v1/research/panel Build a panel of values known at each decision time
An active Individual subscription and API key are required for every request.
Parameters
| Name | In | Type | Details |
|---|---|---|---|
| api_key | query | string | Deprecated: legacy query-string API key. Still accepted so existing integrations keep working, but new integrations must send the key in the X-API-Key header (or Authorization: Bearer). A key is required for non-USD, paid-only, or full-history requests. Responses to requests authenticated this way carry a Deprecation header. |
Request body
| Field | Type | Details |
|---|---|---|
| series[] | object[] | |
| series[].currency | string | |
| series[].indicator | string | |
| series[].max_age_days | integer | |
| series[].period_aggregation | string | |
| decision_times[] | string[] | |
| start_date | date | |
| end_date | date | |
| availability | string | |
| dataset_version | string |
Response fields
| Field | Type | Details |
|---|---|---|
| status | string | |
| dataset_version | string | |
| complete | boolean | |
| availability | string | |
| value_mode | string | |
| value_metadata | object | |
| series[] | object[] | |
| data[] | object[] | |
| quality | object | |
| limits | object |
Works well with
Endpoints people use alongside Official datasets
The whole API
All 24 endpoint guides
Rates and markets