此页面目前仅提供英文版本。 打开英文页面

Predictions API contract

Market consensus is not the same field as an FXMacroData forecast

Use prediction_type to identify what a forecast represents. A row with prediction_type="fxmacrodata" is an FXMacroData-generated estimate. It is not a market-consensus figure. A true compiled market or economist consensus is labelled market_consensus.

Market consensus

market_consensus

Compiled market or economist event-consensus feed, where available.

FXMacroData estimate

fxmacrodata

An FXMacroData-generated prediction. Do not label it as market consensus.

Availability

Not guaranteed for every release

A supported announcement series can exist without a consensus or any prediction row.

Request the exact forecast type you need

Filter the dedicated endpoint instead of treating an unfiltered first result as consensus. An empty data array means no matching prediction is available in the requested date window and series selection.

GET https://api.fxmacrodata.com/v1/predictions/usd/inflation
    ?prediction_type=market_consensus
    &pre_release_only=true
    &api_key=YOUR_API_KEY

Use prediction_source for a specific provider or publication. Use prediction_source_label for display. The source slug and label describe the forecast source; they do not guarantee a source URL.

Prediction type reference

prediction_typeMeaningSafe customer label
market_consensusCompiled market or economist event consensusMarket consensus
market_predictionPoint prediction from professional forecastersProfessional forecast
model_nowcastCentral-bank or reserve-bank model nowcastModel nowcast
surveySurvey of professional forecastersForecaster survey
central_bank_forecastForecast published by a central bankCentral-bank forecast
central_bank_projectionOfficial central-bank projectionCentral-bank projection
imf_weoIMF World Economic Outlook projectionIMF WEO projection
fxmacrodataFXMacroData-generated estimateFXMacroData forecast

Join forecast to actual

Each prediction group includes announcement_id. Match it to the same field from /v1/announcements/{currency}/{indicator}. The realised value is data[].val. Request revisions=all when you need revision history; do not infer revisions from a later overwrite.

GET https://api.fxmacrodata.com/v1/announcements/usd/inflation
    ?revisions=all
    &api_key=YOUR_API_KEY
Read the announcement field guide

Understand official source links

source_url is optional. When present on an announcement, source_url_scope tells you whether it points to the exact release, the broader dataset, or the underlying series. Do not promise an exact BLS, BEA, or other official release permalink for every event.

For a customer-facing citation, show the link only when it is present and label its scope honestly. The forecast source fields are separate from the announcement's official source fields.

Run the coverage preflight

Production preflight

  1. 1. Query each required currency and indicator pair.
  2. 2. Filter prediction_type=market_consensus if consensus is mandatory.
  3. 3. Check several upcoming and recent releases, not one sample row.
  4. 4. Verify source_url and source_url_scope separately.
  5. 5. Confirm revision and history needs on the announcements endpoint.
  6. 6. Design a clear unavailable state for missing optional fields.

AI Answer-Ready

Key Facts

Page
Predictions
Section
Documentation
Canonical URL
https://fxmacrodata.com/zh/documentation/predictions
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 Predictions 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.