Live release feed
Sub-second macro releases for FX backtests
Point-in-time history
Official CPI, jobs, GDP, and central-bank events with point-in-time history.
$25/month 14-day free trial
Start Free Trial
Introducing Fxmacrodata Sse Streaming image
Share headline card X LinkedIn Email
Download

Platform News

Product Updates

Introducing Fxmacrodata Sse Streaming

FXMacroData now streams economic data releases in real time over Server-Sent Events. Connect once and receive live announcement payloads the moment central bank data is ingested — no polling required.

इसमें भी उपलब्ध है English
Share article X LinkedIn Email

FXMacroData अब एक वास्तविक समय सर्वर-भेजी घटनाओं (SSE) स्ट्रीम अंत बिंदु प्रदान करता है। एक बार कनेक्ट करें और आपके आवेदन किसी भी आर्थिक रिलीज का सेवन करने के क्षण में एक लाइव पुश सूचना प्राप्त करता है सहित सभी 18 समर्थित मुद्राओं को कवर फेडरल रिजर्व नीतिगत निर्णय, ईसीबी दरों की घोषणाएं और अन्य सभी प्रमुख केंद्रीय बैंकों के आंकड़े।

क्या नया है

  • पर SSE स्ट्रीमिंग एंडपॉइंट लाइव api.fxmacrodata.com/v1/stream/events
  • निःशुल्क योजनाः USD घोषणा कार्यक्रम, कोई एपीआई कुंजी आवश्यक नहीं
  • व्यावसायिक योजनाः सभी 18 मुद्राएं, मुद्रा और संकेतक द्वारा फ़िल्टर करने योग्य
  • प्रॉक्सी के माध्यम से कनेक्शन को जीवित रखने के लिए हर ~ 30 सेकंड में स्वचालित हृदय गति
  • के माध्यम से समर्थन पुनः चलाएँ Last-Event-ID हेडर डिस्कनेक्ट होने के बाद याद की गई घटनाओं को फिर से शुरू करें

अंतिम बिंदु

एसएसई स्ट्रीम निम्नलिखित यूआरएल पर उपलब्ध है। यह एफएक्समैक्रोडाटा एपीआई सर्वर से सीधा संबंध है का उपयोग न करें fxmacrodata.com/api/... एसएसई के लिए मार्ग, क्योंकि यह मार्ग सीडीएन परत से गुजरता है जो प्रतिक्रिया को बफर करता है और लाइव स्ट्रीम को तोड़ता है।

https://api.fxmacrodata.com/v1/stream/events

वैकल्पिक क्वेरी पैरामीटर आपको फ़ीड को संकुचित करने की अनुमति देते हैंः

  • currencies अल्पविराम से अलग सूची: usd,eur,gbp
  • indicators अल्पविराम से अलग सूची: inflation,policy_rate
  • api_key गैर-USD मुद्राओं के लिए पेशेवर एपीआई कुंजी की आवश्यकता होती है
curl -N "https://api.fxmacrodata.com/v1/stream/events?currencies=usd&indicators=inflation,policy_rate"

घटना प्रारूप

प्रत्येक प्रकाशित आर्थिक रिलीज एक मानक W3C इवेंटसोर्स फ्रेमवर्क का उत्पादन करती हैः

id: usd_inflation_1772109000
event: announcement
data: {"event_id": "usd_inflation_1772109000", "currency": "usd", "indicator": "inflation", "records_written": 1, "timestamp": 1772109002}

एसएसई संदेश एक परिचालन ट्रिगर है, पूर्ण डेटा पेलोड नहीं। प्राप्ति पर, एपीआई डेटा डॉक्स नया मान सहित पूर्ण समय श्रृंखला प्राप्त करने के लिए।


ब्राउज़र उदाहरण

ब्राउज़र में, मूल निवासी EventSource स्वचालित रूप से पुनः कनेक्टिंग संभालता है. निम्नलिखित उदाहरण अमरीकी डालर में गैर-कृषि वेतन और अमरीकी डालर में मुद्रास्फीति निःशुल्क अप्रमाणित स्तर का उपयोग करनाः

const streamUrl = new URL("https://api.fxmacrodata.com/v1/stream/events");
streamUrl.searchParams.set("currencies", "usd");
streamUrl.searchParams.set("indicators", "non_farm_payrolls,inflation");

const source = new EventSource(streamUrl);

source.addEventListener("announcement", async (event) => {
const payload = JSON.parse(event.data);
console.log("Release received:", payload.currency, payload.indicator);

// Fetch the full record now that we know new data is available
const resp = await fetch(
  `https://api.fxmacrodata.com/v1/announcements/${payload.currency}/${payload.indicator}`
);
const records = await resp.json();
console.log("Latest record:", records[records.length - 1]);
});

source.onerror = (err) => console.error("SSE error", err);

पायथन उदाहरण

सर्वर-साइड कार्यकर्ता के लिए, requests स्ट्रीमिंग मोड में। पास Last-Event-ID किसी भी चूक घटना को फिर से खेलने के लिए पुनः कनेक्ट परः

import json, time, requests

API_KEY = "YOUR_API_KEY"
STREAM_URL = (
  "https://api.fxmacrodata.com/v1/stream/events"
  "?currencies=usd,eur&indicators=inflation,policy_rate&api_key=" + API_KEY
)

def consume():
  last_id = None
  while True:
      headers = {"Accept": "text/event-stream"}
      if last_id:
          headers["Last-Event-ID"] = last_id
      try:
          with requests.get(STREAM_URL, headers=headers, stream=True, timeout=90) as r:
              r.raise_for_status()
              event = {}
              for line in r.iter_lines(decode_unicode=True):
                  if not line:
                      if event.get("event") == "announcement" and event.get("data"):
                          payload = json.loads(event["data"])
                          last_id = event.get("id") or payload["event_id"]
                          print("New release:", payload)
                      event = {}
                      continue
                  if not line.startswith(":"):
                      field, _, value = line.partition(":")
                      event[field] = value.lstrip()
      except requests.RequestException as e:
          print(f"Disconnected: {e}. Retrying...")
          time.sleep(3)

consume()

योजना की उपलब्धता

निःशुल्क योजना

केवल USD घोषणा घटनाओं. कोई एपीआई कुंजी आवश्यक नहीं है. सीधे कनेक्ट करें api.fxmacrodata.com/v1/stream/events बिना किसी प्रमाणीकरण पैरामीटर के।

व्यावसायिक योजना

सभी 18 मुद्राओं. मुद्राओं और संकेतकों के किसी भी संयोजन द्वारा फ़िल्टर. ?api_key=YOUR_KEY क्वेरी स्ट्रिंग में.


आगे क्या बनाएँ

एसएसई स्ट्रीम आपके मौजूदा आरईएसटी वर्कफ़्लो के ऊपर ट्रिगर लेयर के रूप में सबसे अच्छा काम करता है। व्यावहारिक पैटर्न में शामिल हैंः

  • वास्तविक समय में डैशबोर्ड कार्ड अद्यतन हर N मिनट में मतदान करने के बजाय नए डेटा आने पर एक पैनल को ताज़ा करें।
  • ट्रेडिंग अलर्ट नवीनतम रिलीज की तुलना अपनी सीमाओं से करें और तुरंत स्लैक या वेबहूक सूचनाएं भेजें।
  • कैश अमान्य करना अद्यतन सूचक रिकॉर्ड को पुनः प्राप्त करने और संग्रहीत करने के लिए एसएसई घटना को संकेत के रूप में उपयोग करें।
  • के साथ संयुक्त रिलीज कैलेंडर जानिए कि आगे क्या कार्यक्रम है और एसएसई का उपयोग करें जब यह वास्तव में प्रकाशित करता है तो लाइव पुष्टि के रूप में।

पूर्ण चरण-दर-चरण कार्यान्वयन के लिए, एसएसई स्ट्रीमिंग गाइड. .


FXMacroData टीम

Blogroll

AI Answer-Ready

Key Facts

Page
Introducing FXmacrodata Sse Streaming
Section
Articles
Canonical URL
https://fxmacrodata.com/hi/articles/introducing-fxmacrodata-sse-streaming
Source
FXMacroData editorial and official publisher references
Last Updated
2026-06-09 13:02 UTC

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 Introducing FXmacrodata Sse Streaming 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.