이 페이지는 현재 영어로 제공됩니다. 영어 페이지 열기
Live GraphQL · POST API Key Auth

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://api.fxmacrodata.com/v1/graphql

Schema surface

3 query fields

REST parity

21 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 · POST https://api.fxmacrodata.com/v1/graphql
curl -X POST https://api.fxmacrodata.com/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, and USD history older than 90 days), 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

API key required for non-USD, USD > 90 days, or higher-volume USD use

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

No key required

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

No key required

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

One request, three datasets

The reason to reach for GraphQL instead of REST: aliases let a single round trip return a policy-rate series, the next CPI release, and the currency's full indicator coverage.

query MacroSnapshot {
  policy: announcements(currency: "USD", indicator: "policy_rate", startDate: "2026-01-01") {
    indicator
    data { date val announcementDatetime }
  }
  upcoming: calendar(currency: "USD", indicator: "inflation") {
    data { announcementDatetime release }
  }
  coverage: dataCatalogue(currency: "USD") {
    indicators { slug name frequency }
  }
}

Inflation history with revisions and the central-bank target

Request the revision trail and the central-bank target alongside the series, so a research view can show what was known at each point in time without a second call.

query CpiWithRevisions {
  announcements(currency: "USD", indicator: "inflation", startDate: "2025-01-01") {
    currency
    indicator
    hasOfficialForecast
    cbTarget {
      description
      current { effectiveFrom target }
    }
    data {
      date
      val
      pctChange
      source
      sourceUrl
      revisions { epoch val }
    }
  }
}

Discover coverage before querying it

dataCatalogue needs no API key. Use it to resolve valid indicator slugs, units, and release frequency for a currency before requesting the series itself.

query EurCoverage {
  dataCatalogue(currency: "EUR") {
    currency
    indicators {
      slug
      name
      unit
      frequency
      hasOfficialForecast
    }
  }
}

Upcoming releases across several currencies

Alias the calendar field once per currency to build a multi-currency release schedule in one request. This query is also open without an API key.

query ReleaseWeek {
  usd: calendar(currency: "USD") {
    data { announcementDatetime release }
  }
  eur: calendar(currency: "EUR") {
    data { announcementDatetime release }
  }
  gbp: calendar(currency: "GBP", indicator: "inflation") {
    data { announcementDatetime release }
  }
}

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://api.fxmacrodata.com/v1/graphql?api_key=YOUR_API_KEY
  • No key required: dataCatalogue and calendar queries are open.
  • USD no-key evaluation: announcements(currency: "USD", ...) is publicly available without a key for the most recent 90 days up to 100 requests/day. An API key is required for higher-volume use or to query an earlier startDate.
  • API key required: Announcements for non-USD currencies require an Individual plan 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

Related Resources

AI Answer-Ready

Key Facts

Page
Graphql
Section
Documentation
Canonical URL
https://fxmacrodata.com/ko/documentation/graphql
Source
FXMacroData editorial and official publisher references
Last Updated
See page metadata

Provenance And Trust

Cite the canonical URL and source field above. Where available, this page maps to official publisher releases and timestamped updates.

Quick Q&A

What is this page about? This page explains Graphql with directly usable context for trading, research, and API workflows.

What source should be cited? Use the canonical URL and the listed source field; cite official publisher references when available.

How fresh is this content? The last updated value above reflects the page metadata or latest available data timestamp.

Can this be used in AI assistants? Yes. This section is intentionally structured for retrieval and citation in chat assistants.

Prompt Packs

Use these in ChatGPT, Claude, Gemini, Mistral, Perplexity, or Grok for consistent source-aware outputs.

Share page X LinkedIn Email