← Entwicklerwerkzeuge

Echtzeit-Datenstream (SSE)

GET /stream

Verbinden Sie sich mit a Server-Sent Events stream for Echtzeit push updates. Subscribe to broad topics oder filter to specific items using the topic:filter syntax. Events include unique IDs for reconnection (pass Last-Event-ID header to resume). Heartbeat keeps the connection alive. Use curl -N oder JavaScript EventSource. 14 topics available: Wechselkurse, crypto, electricity, commodities, economics, holidays, weather, earthquakes, space weather, NASA, sports, news, VAT, und currencies.

Parameter

Themen erforderlich

Comma-separated subscriptions with optional filters (e.g. crypto:bitcoin,electricity:NO1)

Heartbeat optional Standard: 30

Heartbeat interval in seconds (5-300)

Beispielanfragen

Grundlegende Verwendung
curl -N "https://nordapi.ee/api/v1/stream?topics=crypto:bitcoin,electricity:NO1"
Only Bitcoin price updates
curl -N "https://nordapi.ee/api/v1/stream?topics=crypto:bitcoin"
Only Oslo electricity zone
curl -N "https://nordapi.ee/api/v1/stream?topics=electricity:NO1"
EUR/USD and gold
curl -N "https://nordapi.ee/api/v1/stream?topics=exchange_rates:EUR/USD,commodities:gold"
All Nordic electricity with fast heartbeat
curl -N "https://nordapi.ee/api/v1/stream?topics=electricity&heartbeat=15"
Everything crypto and commodities
curl -N "https://nordapi.ee/api/v1/stream?topics=crypto,commodities"
NOK exchange rates only
curl -N "https://nordapi.ee/api/v1/stream?topics=exchange_rates:NOK"

Live-Antwort

Dies ist ein Server-Sent Events (SSE) Streaming-Endpunkt. Er hält die Verbindung offen und sendet Ereignisse in Echtzeit.

Probieren Sie es aus mit:
  curl -N "https://nordapi.ee/stream?topics=crypto:bitcoin"