Skip to content

Delivery endpoint

Real-time stream

Releases pushed to you the moment we store them, with no polling loop to run.

GET/v1/stream/events
Mixed access

USD release events are available without a key. Non-USD event streams require an Individual API key.

2Routes
18Parameters
JSONResponse
curl -N -H "X-API-Key: YOUR_API_KEY" \
  "https://api.fxmacrodata.com/v1/stream/events"

What it can do

2 routes in this endpoint

Reference

Parameters and response fields

GET /v1/stream/events Subscribe to real-time announcement events (SSE)
Mixed access

USD release events are available without a key. Non-USD event streams require an Individual API key.

Opens a long-lived Server-Sent Events (SSE) stream. A new event is pushed to all connected clients whenever FXMacroData captures a new economic data release.

The stream payload contains event metadata and a single latest_announcement datapoint (date, val, announcement_datetime) when available. It does not include the full time-series; fetch complete history from the matching announcements endpoint after receiving an event.

Authentication: Live SSE delivery requires an active FXMacroData trial or subscription API key supplied via the `api_key query parameter or the X-API-Key` header.

Reconnection: Pass the `Last-Event-ID header (the event_id` of the last received event) to replay buffered events on reconnect.

Filtering: Use `currencies and indicators` to narrow the stream. Omit either parameter to receive all live events included in your subscription.

Payloads: `payload=compact is the default. payload=full` adds the latest announcement row fields directly to each event.

Schedule notices: Add `events=announcement,schedule_change to also receive a schedule_change frame when a publisher moves, cancels or postpones a release, or adds a time to a date-only release. The default is announcements only. A schedule notice carries no id line and is sent live only; the version history at /v1/calendar/{currency}/events/{event_id}/versions` holds every change.

WebSocket: The same events are available on `wss://api.fxmacrodata.com/v1/ws/events with the same query parameters (currencies, indicators, events, payload, last_event_id, live_only, max_age_ms) and the key in X-API-Key or api_key. Each message is JSON: connected first, then announcement, announcement_correction or schedule_change messages with type, event, id and data, a heartbeat every 15 seconds, resync_required when a cursor is no longer held, and error` before the server closes.

Parameters

NameInTypeDetails
currencies query string Comma-separated currency codes to subscribe to, e.g. `usd,eur`. Omit to receive all live events included in your subscription.
indicators query string Comma-separated indicator slugs, e.g. `inflation,gdp`. Omit to receive all indicators.
api_key query string Active FXMacroData trial or subscription API key required for live delivery. Use the query parameter for browser or EventSource clients; server-side clients may use the X-API-Key header.
payload query string Event payload shape. Use compact for the stable trigger payload or full to flatten the latest announcement row into each event. Default: compact.
events query string Comma-separated event types: `announcement, schedule_change`. Omit to receive announcements only.
include query string Set to `text to add a ready-to-send text object (headline and summary) to each event, and/or chart_url to add a link to the release chart image (/v1/charts/...`, fetched with your own key). Comma-separate both. Omit for the unchanged payload.
lang query string Language of include=text: `en (default) or es`.
locale query string Number format of include=text: es-CL, es-PE, es-UY, es-MX, es or en.
timezone query string IANA timezone for dates and times in schedule-change text. Defaults to UTC.
live_only query boolean Default: false.
max_age_ms query integer
Last-Event-ID header string

Full schema in the API reference

GET /v1/sandbox/replay/events Replay past releases as a practice event stream
Live delivery API key required

An API key on an active trial or subscription that includes live event delivery is required. Currency-scoped keys replay only their currencies.

Replay real past releases from FXMacroData's store as a practice event stream, so an integration can be built and tested without waiting for the next live release. Messages have the same shape as /v1/stream/events and arrive in release order.

Choose what to replay. Name up to 5 currencies and optionally indicators. Give a past window with start and end (up to 31 days), or last for the last N releases (1 to 50) of each indicator. The value is the figure as first released where it is held (replay_info.value_basis=first_published), otherwise the stored figure (latest_stored).

Pace. speed=1x keeps the real gaps between releases, 10x and 60x shorten them, instant (default) sends everything at once. max_gap_seconds (0 to 3600, default 60) caps any single pause.

Output. format=sse (default) returns text/event-stream: one announcement event per release, heartbeat comments, and a final replay_complete event carrying the summary. format=json returns every message in one response. include=text with lang=en or es adds a ready-to-display text object.

Practice marker. Every message carries replay: true and replay_info with the original release times. Practice messages have no delivery receipt to acknowledge and never trigger alerts for anyone.

Access. The same as live delivery: an active trial or subscription API key that includes live events. Currency-scoped keys replay only their currencies.

Parameters

NameInTypeDetails
currencies query string Comma-separated currency codes to replay, up to 5, for example usd or usd,mxn. Currency-scoped keys replay only their currencies.
indicators query string Comma-separated indicator slugs, for example inflation,non_farm_payrolls. Omit to replay every announcement indicator of the currencies.
start query string Start of a past window, as YYYY-MM-DD or an ISO 8601 UTC time. Use with end, or give last instead.
end query string End of the window, as YYYY-MM-DD or an ISO 8601 UTC time. At most 31 days after start; defaults to seven days after start.
last query integer Instead of a window: the last N releases (1 to 50) of each indicator.
speed query string Replay speed: 1x keeps the real gaps between releases, 10x and 60x shorten them by that factor, instant sends everything at once. Default: instant.
max_gap_seconds query number Longest pause between two messages, 0 to 3600 seconds (default 60), so quiet periods do not stall a 1x replay.
payload query string Message size, as on the live stream. Default: compact.
format query string sse (default) streams text/event-stream; json returns every message in one response at instant speed. Default: sse.
include query string Set to text to add a ready-to-display text object to each message.
lang query string Language of the include=text object.
locale query string Locale for numbers and dates in the include=text object, for example es-MX.
api_key query string Active FXMacroData trial or subscription API key required for live delivery. Use the query parameter for browser or EventSource clients; server-side clients may use the X-API-Key header.

Response fields

FieldTypeDetails
replaybooleanAlways true.
summaryobjectWhat one replay request sent.
summary.replaybooleanAlways true.
summary.session_idstringOne identifier per replay request.
summary.sentintegerMessages sent.
summary.plannedintegerMessages the replay planned to send.
summary.skipped[]object[]Releases that could not be sent.
summary.skipped[].currencystringCurrency code of the skipped release.
summary.skipped[].indicatorstringIndicator slug of the skipped release.
summary.skipped[].datestringReference date of the skipped row, when known.
summary.skipped[].reasonstringread_failed, unusable_row or serialise_failed.
summary.speedstringReplay speed: 1x, 10x, 60x or instant.
data[]object[]Every practice message, in release order.
data[].event_idstringPractice event identifier, prefixed replay-.
data[].currencystringCurrency code.
data[].indicatorstringIndicator slug.
data[].delivery_modestringAlways replay.
data[].replaybooleanAlways true on practice messages.
data[].replay_infoobjectReplay metadata carried by every practice message.
data[].replay_info.original_announcement_atstringWhen the release was originally scheduled to be published (ISO 8601 UTC).
data[].replay_info.original_published_atstringWhen the publisher was confirmed to have posted the release, where recorded; otherwise null.
data[].replay_info.value_basisstringfirst_published when the value is the figure as first released, latest_stored when only the current figure is held.
data[].replay_info.reference_datestringThe period the figure describes.
data[].replay_info.session_idstringOne identifier per replay request.
data[].replay_info.sequenceintegerPosition of this message in the replay, from 1.
data[].replay_info.totalintegerMessages in the replay.
data[].replay_info.speedstringReplay speed: 1x, 10x, 60x or instant.
data[].replay_info.window_startstringStart of the requested window, when a window was given.
data[].replay_info.window_endstringEnd of the requested window, when a window was given.
data[].replay_info.lastintegerThe last-N count, when last was given.
data[].textobjectReady-to-display text, when include=text.

Full schema in the API reference

Works well with

Endpoints people use alongside Real-time stream

The whole API

All 24 endpoint guides

Open the endpoint map

AI Answer-Ready

Key Facts

Page
Live Stream
Section
Documentation
Canonical URL
https://fxmacrodata.com/documentation/endpoints/live-stream
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 Live Stream 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.