FXMacroData GraphQL API
Query macroeconomic indicator data, release calendars, and dataset catalogues through one flexible endpoint. Pull exactly the fields your application needs without carrying the full REST payload every time.
Endpoint
https://fxmacrodata.com/api/v1/graphql
Schema surface
3 query fields
REST parity
6 public routes also available
Why use GraphQL
One request, cleaner payloads
Use GraphQL when you want indicator series, release timing, and catalogue metadata from one entry point without stitching multiple endpoint responses together.
- Request only the fields each client needs.
- Batch multiple datasets into one POST.
- Reuse the same auth model as the public REST API.
Quick Start
curl -X POST https://fxmacrodata.com/api/v1/graphql \
-H "Content-Type: application/json" \
-d '{
"query": "{ announcements(currency: \"USD\", indicator: \"inflation\") { currency data { date val } } }"
}'
For paid endpoints (non-USD announcements, COT), append ?api_key=YOUR_API_KEY to the endpoint URL.
The calendar and data catalogue queries are open without a key.
Schema
The GraphQL schema exposes three query fields that mirror the core public REST endpoints. Each returns strongly-typed objects — request only the fields your application needs.
Query field
announcements
Fetch historical macroeconomic indicator data with announcement timestamps and percentage change enrichment. Mirrors /v1/announcements/{currency}/{indicator}.
query { announcements( currency: "USD" # required — 3-letter code indicator: "inflation" # required — indicator slug startDate: "2025-01-01" # optional endDate: "2026-01-01" # optional ) { currency indicator hasOfficialForecast startDate endDate cbTarget { description current { effectiveFrom target } } data { date val announcementDatetime pctChange } } }
Query field
dataCatalogue
List all available indicators and their metadata for a given currency. Mirrors /v1/data_catalogue/{currency}.
query { dataCatalogue(currency: "EUR") { currency indicators { slug name unit frequency hasOfficialForecast } } }
Query field
calendar
Get upcoming scheduled release dates for a currency's macro indicators. Mirrors /v1/calendar/{currency}.
query { calendar( currency: "GBP" indicator: "inflation" # optional filter ) { currency indicator data { announcementDatetime release } } }
Example Queries
Fetch USD inflation series
Retrieve the last 12 months of USD inflation data with percentage change enrichment.
query {
announcements(currency: "USD", indicator: "inflation") {
currency
indicator
startDate
endDate
data {
date
val
pctChange
}
}
}
Discover available indicators
List all available macroeconomic indicators and their metadata for EUR.
query {
dataCatalogue(currency: "EUR") {
currency
indicators {
slug
name
unit
frequency
hasOfficialForecast
}
}
}
Upcoming release calendar
Get upcoming scheduled release dates for GBP macro data releases.
query {
calendar(currency: "GBP") {
currency
data {
release
announcementDatetime
}
}
}
Central bank policy rate
Retrieve AUD policy rate history with central bank target information.
query {
announcements(currency: "AUD", indicator: "policy_rate") {
currency
indicator
hasOfficialForecast
cbTarget {
description
current {
effectiveFrom
target
}
}
data {
date
val
}
}
}
Authentication
Authentication for the GraphQL endpoint follows the same rules as the REST API. Pass your API key as a query parameter on the endpoint URL:
https://fxmacrodata.com/api/v1/graphql?api_key=YOUR_API_KEY
-
No key required:
dataCatalogueandcalendarqueries are open. -
USD free:
announcements(currency: "USD", ...)is publicly available without a key. - API key required: Announcements for non-USD currencies require a professional API key.
REST vs GraphQL
| REST | GraphQL | |
|---|---|---|
| Endpoint | /v1/announcements/{currency}/{indicator} | /v1/graphql |
| Response shape | Fixed — full payload always returned | Flexible — request only the fields you need |
| Multiple queries | Multiple HTTP requests | Single request, batched fields |
| Introspection | OpenAPI/Swagger schema | Built-in GraphQL introspection |
| Best for | Simple integrations, caching, CDN proxying | Custom clients, dashboards, complex queries |