← Þróunarverkfæri

Rauntíma gagnastreymi (SSE)

GET /stream

Tengdu við a Server-Sent Events stream for rauntíma push updates. Gerðu áskrift að broad topics or filter to specific items með 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: gengi, crypto, electricity, commodities, economics, holidays, weather, earthquakes, geimveður, NASA, sports, news, VAT, and currencies.

Breytur

efni nauðsynlegt

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

hjartsláttur valfrjálst sjálfgefið: 30

Heartbeat interval in seconds (5-300)

Dæmi um fyrirspurnir

Grunnnotkun
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"

Lifandi svar

Þetta er Server-Sent Events (SSE) streymiendapunktur. Hann heldur tengingunni opinni og sendir atburði í rauntíma.

Prófaðu með:
  curl -N "https://nordapi.ee/stream?topics=crypto:bitcoin"