Events API reference
Durable event journal, replay cursors and live WebSocket delivery
REST journal
GET / returns a cursor page. GET / returns one eligible immutable event. For GET /, repeat countries to filter by up to 50 ISO alpha-3 codes. EMU, the euro area, is also accepted; no other union id is. limit is 1–100 (default 100). Pass cursor to resume after the last event you processed. The response contains events, next_ and cursor (the journal's latest position, where a new poller starts). Pass next_ as cursor for the next page, even on the last nonempty page. It is null only on an empty poll at the journal's latest position. GET / returns the event itself. A field with no value is left out of an event. An unknown event_ returns 404 event_. An expired cursor returns 409 cursor_: restart without it.
Event fields
Each event has these fields.
| Field | Meaning |
|---|---|
cursor | cursor is an opaque journal position. Store it and pass it back unchanged. |
event_ | event_ is the stable event ID. |
type | type is the event type listed below. |
family | family is one of gdp, prices, labour, trade, policy_, activity, survey, housing, money, public_, yield_ or holidays. |
country | country is an ISO alpha-3 code, or EMU for the euro area. |
recorded_ | recorded_ is when the event was recorded, in UTC without fractional seconds, such as 2026-10-21T09:00:00Z. |
resource_ | resource_ and resource_ identify the changed resource and its version; resource_ is the version_ used to read that version of the data. resource_ is left out on release events. |
release_ | release_ identifies the calendar release. It is left out when the event has no release. |
holiday_ | For holiday events, holiday_ and holiday_ give the calendar's year and generation, and country is its country. The holiday year and generation are left out on other events. |
WebSocket stream
Connect to / with your API key in the Authorization: Bearer header. Servers and apps always connect this way; stream tickets (POST /) are for the Narwhal website only. Every account can connect, and each connection costs one call. Subscribe with country, family, event-type and cursor filters. The server sends ready. Send subscribe as the first frame within 5 seconds. Empty countries, families or event_ lists select all eligible values for that filter. Client frames are capped at 2,048 bytes. The server replies with subscribed, then sends event objects, heartbeat and pong frames. Each carries a cursor. A second subscribe message closes the connection with resubscribe_. Subscribe with up to 60 countries, 12 families and 9 event_. Errors arrive as {"type":"error","code":"..."}. Codes: stream_, rate_, subscribe_, quota_, unauthorized, slow_, feed_, revoked, resubscribe_, command_, invalid_, invalid_, cursor_, cursor_ and shutdown. When the account already has its maximum number of concurrent stream connections, the stream sends {"type":"error","code":"stream_ and closes, as with the prices and predictions streams.
| Code | Meaning |
|---|---|
subscribe_ | No subscribe frame was sent within 5 seconds. |
quota_ | The connection could not be charged to the account's credit. |
unauthorized | The API key or stream ticket is missing or invalid. |
cursor_ means the replay cursor is outside retained history. Restart without it and rebuild from current snapshots. cursor_ means the cursor is ahead of the journal. Use a cursor returned by the server.
{
"action": "subscribe",
"countries": [],
"families": [],
"event_types": []
}An event frame is the event object itself, as in this example.
{
"cursor": "1",
"event_id": "2cdf117d-0000-4000-8000-000000000001",
"type": "dataset.published",
"country": "MEX",
"family": "labour",
"resource_id": "775d11a3-0000-4000-8000-000000000001",
"resource_version": "822e107c-0000-4000-8000-000000000001",
"recorded_at": "2026-09-25T15:44:56Z"
}Event types
The REST journal and WebSocket stream carry the event types below. Backfills and identical repeats emit no event; replay preserves each event's pinned publication version.
| Event type | Meaning |
|---|---|
release.rescheduled | When a scheduled release moves to a new date or time |
release.cancelled | When a scheduled release is cancelled |
release.updated | When a calendar release carries a figure it did not carry before |
dataset.published | When an accepted official publication adds a new reference period |
dataset.revised | When an accepted publication changes a previously published period's value |
yield_ | When a new yield-curve date is accepted |
yield_ | When a published yield-curve date changes |
holiday.calendar.revised | When a published holiday calendar changes |
Recovery
Persist the last acknowledged cursor. Reconnect with it to replay the gap before live delivery resumes. Expired cursors, slow consumers and revoked rights close with an explicit error and resume cursor.
Was this page helpful?