Documentation

Production API Endpoint Documentation

Canonical public reference for the FX macro REST API. Covers announcements, release calendars, data discovery, COT positioning, precious metals, forex rates, and market sessions.

Base URL

https://fxmacrodata.com/api

Authentication

?api_key=YOUR_API_KEY

Append as a query parameter on request URLs

Endpoints

7 endpoints · 3 families

Access model

4

Always free

Calendar, data catalogue, forex, and market sessions require no API key.

Access model

1

Pro (USD free)

Announcements are mixed-access: USD is public, while non-USD currencies require a Professional API key.

Access model

2

Pro key required

COT and commodities require a Professional API key for every request.

Quick Start Guide

How To Use FXMacroData Endpoints and Authentication

Start with one complete walkthrough covering authentication, endpoint families, real request examples, and the fastest way to move from testing USD endpoints to a production multi-currency integration.

What it covers

  • Authentication with ?api_key=YOUR_API_KEY
  • Announcements, release calendar, COT, metals, forex, and sessions
  • Request patterns for USD-free and pro-key endpoint usage

Endpoint family

Macro data and discovery

Fetch normalized macroeconomic indicator series with announcement timestamps, browse upcoming release schedules, and discover available indicators per currency.

GET /api/v1/announcements/{currency}/{indicator} Pro key · USD free

Historical macroeconomic indicator series with announcement timestamps.

USD is free without a key. All other currencies require a Professional API key.

Path parameters
NameTypeRequiredDescription
currency string required 3-letter currency code.
e.g. usd, eur, gbp, jpy, aud, cad, chf, nzd, cny, sgd, sek, dkk, pln, brl
indicator string required Indicator slug. Use /v1/data_catalogue/{currency} to list available slugs per currency.
e.g. gdp, inflation, core_inflation, policy_rate, unemployment
Query parameters
NameTypeRequiredDescription
start_date string (YYYY-MM-DD) optional Earliest date to include. Defaults to 365 days ago.
e.g. 2025-01-01
end_date string (YYYY-MM-DD) optional Latest date to include. Defaults to today.
e.g. 2026-03-01
api_key string pro/free Professional API key. Required for non-USD currencies.
e.g. YOUR_API_KEY
Response fields
FieldTypeDescription
currency string 3-letter currency code.
indicator string Indicator slug as requested.
has_official_forecast boolean True if the central bank publishes an official forecast for this indicator.
start_date string Earliest date in the returned series (YYYY-MM-DD).
end_date string Latest requested end date (YYYY-MM-DD).
cb_target object | null Central bank target metadata (e.g. inflation target range), if applicable.
data[].date string Observation date (YYYY-MM-DD).
data[].val number | null Observed value in the indicator's native unit.
data[].announcement_datetime integer | null Unix timestamp (UTC) of the official data release.
data[].pct_change number | null Period-over-period percentage change.
data[].pct_change_12m number | null 12-month rolling percentage change.

Example request

GET https://fxmacrodata.com/api/v1/announcements/usd/inflation

Public USD endpoint — no API key needed. Add ?api_key=YOUR_KEY for non-USD currencies.

Supported currencies (14)
USD EUR GBP JPY AUD CAD CHF NZD CNY SGD SEK DKK PLN BRL
GET /api/v1/calendar/{currency} Free

Upcoming release dates for a currency and optional indicator filter.

Fully public — no API key required.

Path parameters
NameTypeRequiredDescription
currency string required 3-letter currency code or COMM for commodity release schedules.
e.g. usd, eur, gbp, jpy, aud, cad, chf, nzd, cny, sgd, sek, dkk, pln, brl, COMM
Query parameters
NameTypeRequiredDescription
indicator string optional Optional filter to a specific indicator slug (e.g. inflation, gdp).
e.g. inflation, gdp, unemployment
Response fields
FieldTypeDescription
currency string Currency code as requested.
indicator string | null Indicator filter if provided, otherwise null.
data[].announcement_datetime integer Unix timestamp (UTC) of the upcoming release.
data[].release string Indicator slug for this release row (e.g. inflation, policy_rate).
data[].domain string Present on non-announcement rows (e.g. cot). Identifies the data domain.
data[].endpoint_family string Endpoint family identifier for non-announcement rows (e.g. cot).
data[].endpoint_path string Suggested API path to fetch the full release data.
data[].requires_api_key boolean Whether the linked endpoint requires a Professional API key.
data[].title string Human-readable title for the release (present on extended domain rows).

Example request

GET https://fxmacrodata.com/api/v1/calendar/usd

Returns all upcoming USD macro release dates. Filter by indicator with ?indicator=inflation.

Supported currencies (19)
USD EUR GBP JPY AUD CAD CHF NZD CNY SGD SEK DKK PLN BRL HKD KRW MXN NOK COMM
GET /api/v1/data_catalogue/{currency} Free

Available indicator metadata for a currency.

Fully public — no API key required.

Path parameters
NameTypeRequiredDescription
currency string required 3-letter currency code.
e.g. usd, eur, gbp, jpy, aud, cad, chf, nzd
Query parameters
NameTypeRequiredDescription
include_capabilities boolean optional If true, adds route and authentication discovery metadata per indicator.
e.g. true
include_coverage boolean optional If true, adds a per-currency availability grid across all supported currencies.
e.g. true
Response fields
FieldTypeDescription
{indicator_slug} object Top-level key is the indicator slug (e.g. gdp, inflation, policy_rate).
{slug}.name string Human-readable indicator name.
{slug}.unit string Unit of measurement (e.g. %YoY, %QoQ, %).
{slug}.frequency string Release frequency (Monthly, Quarterly, Meeting, Daily).
{slug}.has_official_forecast boolean Whether the central bank publishes an official forecast.

Example request

GET https://fxmacrodata.com/api/v1/data_catalogue/usd

Lists all indicators available for USD with name, unit, and frequency metadata.

Supported currencies (14)
USD EUR GBP JPY AUD CAD CHF NZD CNY SGD SEK DKK PLN BRL

Endpoint family

FX market structure and sentiment

Query spot FX pairs and inspect the live global trading-session schedule for market-timing workflows.

GET /api/v1/forex/{base}/{quote} Free

Daily FX spot-rate series for a currency pair, with optional technical indicators.

Fully public — no API key required.

Path parameters
NameTypeRequiredDescription
base string required Base currency 3-letter code.
e.g. EUR, GBP, USD, AUD
quote string required Quote currency 3-letter code.
e.g. USD, JPY, CHF, CAD
Query parameters
NameTypeRequiredDescription
start_date string (YYYY-MM-DD) optional Start of the date range. Defaults to 365 days ago.
e.g. 2025-01-01
end_date string (YYYY-MM-DD) optional End of the date range. Defaults to today.
e.g. 2026-03-01
indicators string optional Comma-separated technical indicator slugs to append to each row (e.g. sma_20,rsi_14).
e.g. sma_20,rsi_14
Response fields
FieldTypeDescription
base string Base currency code.
quote string Quote currency code.
start_date string Earliest date in the series (YYYY-MM-DD).
end_date string Latest date in the series (YYYY-MM-DD).
data[].date string Trading date (YYYY-MM-DD).
data[].val number | null Spot rate for the pair on this date.
indicators.{slug}.{date} number | null Per-date value for the requested technical indicator (e.g. sma_20, rsi_14). Only present when indicators parameter is supplied. Multi-series indicators (macd, bollinger_bands) return nested dicts.

Example request

GET https://fxmacrodata.com/api/v1/forex/eur/usd

Returns daily EUR/USD spot rates for the past year.

Supported currencies (14)
USD EUR GBP JPY AUD CAD CHF NZD CNY SGD SEK DKK PLN BRL
GET /api/v1/market_sessions Free

Real-time FX market-session and overlap timetable.

Fully public — no API key required.

Query parameters
NameTypeRequiredDescription
at string (ISO-8601 UTC) optional Optional reference timestamp for scheduling or back-testing. Defaults to current server time.
e.g. 2026-03-05T12:00:00Z
Response fields
FieldTypeDescription
now_utc string Current server time in ISO-8601 UTC.
now_unix integer Current server time as Unix epoch.
is_market_day boolean False on weekends and major market holidays.
sessions[].name string Session name (Sydney, Tokyo, London, New York).
sessions[].display_name string Full descriptive name including region.
sessions[].description string Brief characterisation of the session.
sessions[].currencies array Currency codes most active during this session.
sessions[].timezone string IANA timezone for the session's home market.
sessions[].open_utc string Today's session open in ISO-8601 UTC.
sessions[].close_utc string Today's session close in ISO-8601 UTC.
sessions[].is_open boolean Whether the session is currently open.
sessions[].seconds_to_open integer | null Seconds until this session opens (null if already open or closed for the day).
sessions[].seconds_to_close integer | null Seconds until this session closes (null if not currently open).
overlaps[].name string Overlap window name (e.g. London / New York).
overlaps[].sessions array Session names that form this overlap.
overlaps[].description string Characterisation of liquidity during this overlap.
overlaps[].priority string Liquidity priority — high, medium, or low.
overlaps[].notable_pairs array Most actively traded pairs during this overlap.
overlaps[].start_utc string Overlap window start in ISO-8601 UTC.
overlaps[].end_utc string Overlap window end in ISO-8601 UTC.
overlaps[].is_active boolean Whether the overlap window is currently active.
overlaps[].duration_hours number Duration of the overlap in hours.

Example request

GET https://fxmacrodata.com/api/v1/market_sessions

Returns a real-time snapshot of all four sessions plus overlap windows. Use ?at=2026-03-05T08:00:00Z for a historical snapshot.

Endpoint family

Market positioning and metals

CFTC Commitment of Traders positioning by currency and precious metals price series for cross-market analysis.

GET /api/v1/cot/{currency} Pro key required

Weekly CFTC Commitment of Traders positioning by currency.

Always requires a Professional API key.

Path parameters
NameTypeRequiredDescription
currency string required 3-letter currency code. Maps to the corresponding CME FX futures contract.
e.g. USD, EUR, GBP, JPY, AUD, CAD, CHF, NZD
Query parameters
NameTypeRequiredDescription
start_date string (YYYY-MM-DD) optional Start of the date range. Defaults to 52 weeks ago.
e.g. 2025-01-01
end_date string (YYYY-MM-DD) optional End of the date range. Defaults to today.
e.g. 2026-03-01
api_key string required Professional API key.
e.g. YOUR_API_KEY

Supported currencies

USD EUR GBP JPY AUD CAD CHF NZD
Response fields
FieldTypeDescription
currency string 3-letter currency code.
instrument string Full CFTC instrument name (e.g. JAPANESE YEN - CHICAGO MERCANTILE EXCHANGE).
fx_overlay.pair string Conventional spot pair label for chart overlays (e.g. USD/JPY, GBP/USD, DXY).
start_date string Start of the returned series (YYYY-MM-DD).
end_date string End of the returned series (YYYY-MM-DD).
data[].date string Tuesday as-of date for the COT snapshot (YYYY-MM-DD).
data[].announcement_datetime integer Unix timestamp of the Friday 3:30 PM ET CFTC publication for this row.
data[].open_interest integer Total open interest across all participants.
data[].noncommercial_long integer Non-commercial (speculative) long positions.
data[].noncommercial_short integer Non-commercial (speculative) short positions.
data[].noncommercial_net integer Net speculative positioning (long minus short).
data[].noncommercial_spread integer Non-commercial spread positions.
data[].commercial_long integer Commercial (hedger) long positions.
data[].commercial_short integer Commercial (hedger) short positions.
data[].commercial_net integer Net commercial positioning (long minus short).
data[].total_reportable_long integer Total reportable long positions.
data[].total_reportable_short integer Total reportable short positions.
data[].nonreportable_long integer Non-reportable (small trader) long positions.
data[].nonreportable_short integer Non-reportable (small trader) short positions.

Example request

GET https://fxmacrodata.com/api/v1/cot/usd?api_key=YOUR_API_KEY

Returns USD COT history. All COT requests require a Professional API key. Data sourced from the CFTC Legacy Futures-Only report.

GET /api/v1/commodities/{indicator} Pro key required

Precious metals price series for gold, silver, and platinum.

Always requires a Professional API key regardless of indicator.

Path parameters
NameTypeRequiredDescription
indicator string required Commodity indicator slug.
e.g. gold, silver, platinum
Query parameters
NameTypeRequiredDescription
start_date string (YYYY-MM-DD) optional Start of the date range. Defaults to 365 days ago.
e.g. 2025-01-01
end_date string (YYYY-MM-DD) optional End of the date range. Defaults to today.
e.g. 2026-03-01
api_key string required Professional API key.
e.g. YOUR_API_KEY
Supported metals indicators (3)
SlugNameUnitFrequency
gold Gold (LBMA PM Fix) USD/troy oz Daily
silver Silver (LBMA Fix) USD/troy oz Daily
platinum Platinum Spot USD/troy oz Daily
Response fields
FieldTypeDescription
currency string Always COMM (commodity namespace).
indicator string Precious metals slug as requested (e.g. gold, silver, platinum).
has_official_forecast boolean Always false — precious metals have no official central bank forecast.
start_date string Earliest date in the returned series (YYYY-MM-DD).
end_date string Latest requested end date (YYYY-MM-DD).
data[].date string Observation date (YYYY-MM-DD).
data[].val number | null Price or index value in the indicator's native unit.
data[].announcement_datetime integer | null Unix timestamp of the official data publication (null for daily prices).
data[].pct_change number | null Period-over-period percentage change.
data[].pct_change_12m number | null 12-month rolling percentage change.

Example request

GET https://fxmacrodata.com/api/v1/commodities/gold?api_key=YOUR_API_KEY

Returns gold LBMA PM Fix daily spot prices for the past year. Replace gold with silver or platinum for the other supported metals.

Indicator coverage

Announcement endpoint index

Per-currency detail pages for every announcement indicator. USD endpoints are free; all others require a Professional subscription.

Economy (29)

Gross Domestic Product (GDP) Growth

gdp

Measures the quarterly change in the inflation-adjusted value of all goods and services produced.

Inflation Rate (CPI/HICP)

inflation

Measures the year-over-year percentage change in the Consumer Price Index (CPI).

Core Inflation

core_inflation

CPI excluding volatile items like food and energy.

PCE Price Index

pce

The headline Personal Consumption Expenditures price index published by BEA.

Producer Price Index (PPI)

ppi

Measures the average change over time in the selling prices received by domestic producers for their output.

Trade Balance

trade_balance

The difference between the value of a country's exports and imports.

Balance on Goods

balance_on_goods

Balance of payments: trade in goods.

Balance on Services

balance_on_services

Balance of payments: trade in services.

Exports of Goods & Services

exports

Total exports reported by ABS (AUD millions), quarterly based on national accounts.

Imports of Goods & Services

imports

Total imports reported by ABS (AUD millions), quarterly based on national accounts.

Current Account Balance

current_account_balance

Measures trade in goods and services and income flows.

Retail Sales

retail_sales

Measures change in the total value of sales at the retail level.

Industrial Production

industrial_production

Measures the output of the industrial sector (manufacturing, mining, utilities).

Durable Goods Orders

durable_goods_orders

Measures new orders placed with domestic manufacturers for delivery of long-lasting goods.

Consumer Sentiment

consumer_sentiment

A survey of consumer confidence levels.

Trade-Weighted Index (NEER)

trade_weighted_index

Nominal Effective Exchange Rate (NEER) measuring the value of a currency relative to a basket of trading partners'...

House Price Index

house_price_index

Measures changes in residential property prices over time, reflecting housing market conditions and consumer wealth.

Inflation MoM

inflation_mom

Month-over-month change in the consumer price index, measuring short-term inflationary momentum.

Producer Price Index MoM (PPI)

ppi_mom

Month-over-month change in producer prices, an early indicator of inflationary pressure in the supply chain.

Core Inflation MoM

core_inflation_mom

Month-over-month change in core consumer prices (excluding food and energy), tracking underlying inflation trends.

PCE MoM

pce_mom

Month-over-month change in the Personal Consumption Expenditures price index.

Building Permits

building_permits

Number of new residential construction permits authorized, a leading indicator of future housing activity and...

Housing Starts

housing_starts

Number of new residential construction projects that have begun in a given period, a key indicator of economic...

Government Debt

government_debt

Total outstanding debt obligations of the central government, indicating fiscal sustainability and public sector...

Manufacturing PMI

pmi

Purchasing Managers' Index for the manufacturing sector, a leading indicator of economic activity based on surveys...

Services PMI (NMI)

nmi

Non-Manufacturing Index (NMI) or Services PMI, a leading indicator of economic activity in the services sector. A...

Business Confidence

business_confidence

Survey-based measure of business executives' outlook on economic conditions, production, and investment plans.

Consumer Confidence

consumer_confidence

Survey-based measure of consumers' confidence in economic conditions, employment prospects, and personal finances.

Business Sentiment

business_sentiment

Survey-based measure of business sentiment reflecting executive expectations for production, orders, and overall...

Labor Market (11)

Unemployment Rate

unemployment

Percentage of the labor force that is unemployed.

Employment Level

employment

Total number of employed persons.

Full-Time Employment

full_time_employment

Number of persons employed full-time.

Part-Time Employment

part_time_employment

Number of persons employed part-time.

Labor Force Participation Rate

participation_rate

Ratio of the labor force to the working-age population.

Non-Farm Payrolls (NFP)

non_farm_payrolls

Number of workers in the U.S. excluding farm workers.

Average Hourly Earnings

average_hourly_earnings

Measures the change in the price businesses pay for labor.

Initial Jobless Claims

initial_jobless_claims

Weekly initial unemployment insurance claims.

Average Weekly Earnings / Wages

wages

Measures nominal wage growth.

Job Openings

job_openings

Total number of unfilled job positions, a key indicator of labor market demand and tightness.

NAIRU (Natural Rate of Unemployment)

nairu

Non-Accelerating Inflation Rate of Unemployment — the estimated unemployment rate consistent with stable inflation,...

Money & Credit (10)

Broad Money (M3)

broad_money

Total money supply including cash, deposits and other liquid assets.

Credit Growth

credit_growth

Total credit growth from RBA series.

Narrow Money (M1)

m1

Currency in circulation + transaction deposits. RBNZ column A.

M2 Money Supply

m2

M1 + savings deposits (on-call). RBNZ derived: column A + B1.

Broad Money (M3)

m3

M1 + savings + term deposits. RBNZ column A+B (broadest aggregate).

Currency in Circulation

money_supply_currency

Currency held by the public. M1 sub-component A1.

Transaction Deposits

money_supply_transaction_deposits

Demand deposits. M1 sub-component A2.

Savings Deposits

money_supply_savings_deposits

On-call savings deposits. M2 incremental component B1.

Term Deposits

money_supply_term_deposits

Fixed-term deposits. M3 incremental component B2.

Total Domestic Credit

domestic_credit

Net credit to central government + private sector credit. RBNZ column C+D.

Monetary Policy (5)

Central Bank Policy Rate

policy_rate

Primary interest rate set by the Central Bank.

Risk Free Rate

risk_free_rate

Overnight lending rate between banks.

Foreign Exchange Reserves

foreign_reserves

Assets held by the central bank in foreign currencies, used to support the exchange rate and manage monetary policy....

Gold Reserves

gold_reserves

Quantity of gold held by the central bank as part of its foreign exchange reserves, measured in value terms.

Central Bank Total Assets

cb_assets

Total assets on the central bank's balance sheet, reflecting the scale of monetary policy operations including...

Government Bond Yields (12)

1-Year Government Bond Yield

gov_bond_1y

2-Year Government Bond Yield

gov_bond_2y

3-Year Government Bond Yield

gov_bond_3y

4-Year Government Bond Yield

gov_bond_4y

5-Year Government Bond Yield

gov_bond_5y

7-Year Government Bond Yield

gov_bond_7y

10-Year Government Bond Yield

gov_bond_10y

20-Year Government Bond Yield

gov_bond_20y

30-Year Government Bond Yield

gov_bond_30y

40-Year Government Bond Yield

gov_bond_40y

Inflation-Linked Bond Yield

inflation_linked_bond

10-Year Breakeven Inflation Rate

breakeven_inflation_rate

Interest Rates (1)

Overnight Deposit Rate

deposit_rates

Overnight deposit rate at registered banks. RBNZ daily banking rates.

SNB Indicators (2)

Sight Deposits

sight_deposits

SNB sight deposits (Girokonto balances).

SNB Balance Sheet

snb_balance_sheet

SNB total balance sheet assets.

Additional Indicators (21)

BoC Business Outlook

boc_business_outlook

Indicator validated by integration tests.

Building Approvals

building_approvals

Indicator validated by integration tests.

Energy Commodities

commodity_price_energy

Indicator validated by integration tests.

Ex-Energy Commodities

commodity_price_ex_energy

Indicator validated by integration tests.

Commodity Price Index

commodity_price_index

Indicator validated by integration tests.

Commodity Prices

commodity_prices

Indicator validated by integration tests.

Consumer Expectations

consumer_expectations

Indicator validated by integration tests.

Core Inflation (Median)

core_inflation_median

Indicator validated by integration tests.

Core Inflation (Trim)

core_inflation_trim

Indicator validated by integration tests.

FX Reserves

fx_reserves

Indicator validated by integration tests.

Quarterly GDP

gdp_quarterly

Indicator validated by integration tests.

Household Credit

household_credit

Indicator validated by integration tests.

Inflation Expectations

inflation_expectations

Indicator validated by integration tests.

KOF Barometer

kof_barometer

Indicator validated by integration tests.

Monthly CPI

monthly_cpi

Indicator validated by integration tests.

Mortgage Rate

mortgage_rate

Indicator validated by integration tests.

Real Exchange Rate

real_exchange_rate

Indicator validated by integration tests.

Tankan Capex

tankan_capex

Indicator validated by integration tests.

Terms of Trade

terms_of_trade

Indicator validated by integration tests.

Trimmed Mean Inflation

trimmed_mean_inflation

Indicator validated by integration tests.

Wage Price Index

wage_price_index

Indicator validated by integration tests.

API response structure

Representative payload snapshots

Example field values from the live production contract. Core timestamp semantics are consistent across families; each endpoint adds domain-specific fields on top.

Discovery

USD catalogue metadata

Indicator discovery is not limited to one headline series. The live USD catalogue currently includes growth, inflation, rates, labor, housing, liquidity, and reserve metrics.

/api/v1/data_catalogue/usd
gdp GDP · %QoQ · Quarterly
inflation Inflation CPI · %YoY · Monthly
policy_rate Policy Rate · % · Meeting

Announcement Series

EUR inflation release data

Announcement series return a top-level envelope plus a data array of observations, each stamped with the exact publication timestamp used for event-driven research.

/api/v1/announcements/eur/inflation
currency EUR
indicator inflation
has_official_forecast false
data[0].date 2026-02-28
data[0].val 2.3
data[0].announcement_datetime 1772272800

COT Positioning

GBP speculative positioning

Weekly CFTC COT data tracks net speculative positioning by currency. Includes open interest, long/short splits for commercial, non-commercial, and non-reportable traders.

/api/v1/cot/gbp
currency GBP
instrument BRITISH POUND - CME
fx_overlay.pair GBP/USD
data[0].date 2026-02-24
data[0].open_interest 245,678
data[0].noncommercial_net -8,020

Release Calendar

JPY upcoming releases

The calendar endpoint returns upcoming releases sorted by announcement timestamp. Non-announcement rows (e.g. COT) include routing metadata like endpoint_path.

/api/v1/calendar/jpy
currency JPY
data[0].release policy_rate
data[0].announcement_datetime 1774580400
data[1].endpoint_family cot
data[1].endpoint_path /v1/cot/jpy
data[1].requires_api_key true

Metals

Gold LBMA PM Fix prices

Precious metals series return daily price data from official sources with period-over-period and 12-month change enrichment.

/api/v1/commodities/gold
currency COMM
indicator gold
data[0].date 2026-02-28
data[0].val 2870.00
data[0].pct_change 1.2
data[0].pct_change_12m 30.1

Market Sessions

Live FX session snapshot

The market sessions endpoint returns real-time open/close state for Sydney, Tokyo, London, and New York, plus overlap windows showing peak-liquidity periods.

/api/v1/market_sessions
is_market_day true
sessions[0].name London
sessions[0].is_open true
sessions[0].seconds_to_close 18000
overlaps[0].name London / New York
overlaps[0].priority high

Schema and connectors

OpenAPI schema and MCP reference

The production OpenAPI schema is the authoritative path list. The MCP reference covers remote AI tooling and OAuth connector behavior.