← Utilidades para desarrolladores

Flujo de datos en tiempo real (SSE)

GET /stream

Connect to a Server-Sent Events stream for real-time push updates. Subscribe to broad topics or 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 or JavaScript EventSource. 14 topics available: tasas de cambio, crypto, electricity, commodities, economics, holidays, weather, earthquakes, space weather, NASA, sports, news, VAT, and divisas.

Parametros

temas requerido

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

heartbeat opcional predeterminado: 30

Heartbeat interval in seconds (5-300)

Ejemplos de solicitudes

Uso basico
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"

Respuesta en vivo

Este es un endpoint de transmision Server-Sent Events (SSE). Mantiene la conexion abierta y envia eventos en tiempo real.

Pruebelo con:
  curl -N "https://nordapi.ee/stream?topics=crypto:bitcoin"