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
FXMacroData SSE 스트리밍을 소개합니다 image
Share headline card X LinkedIn Email
Download

Platform News

Product Updates

FXMacroData SSE 스트리밍을 소개합니다

FXMacroData는 이제 서버-송 이벤트에서 실시간으로 경제 데이터 발표를 스트리밍합니다. 한번 연결하여 중앙 은행 데이터가 섭취되는 순간 실시간 발표 유료물을 수신합니다. 투표가 필요하지 않습니다.

다른 언어로도 제공 English
Share article X LinkedIn Email

FXMacroData now offers a real-time Server-Sent Events (SSE) stream endpoint. Connect once and your application receives a live push notification the moment any economic release is ingested — covering all 18 supported currencies including 연방준비제도 정책 결정, 은행 다른 주요 중앙은행의 데이터와 같은

무슨 일이야?

  • SSE 스트리밍 엔드포인트에서 실시간으로 api.fxmacrodata.com/v1/stream/events
  • 무료 계획: USD 발표 이벤트, API 키가 필요하지 않습니다
  • 프로페셔널 플랜: 모든 18개 통화, 통화와 지표에 따라 필터링
  • 자동 심장 박동 ~ 30초마다 프록시를 통해 연결을 유지
  • Last-Event-ID 헤더 끊기 후에 놓친 이벤트를 재개합니다

최종점

SSE 스트림은 다음 URL에서 사용할 수 있습니다. 이것은 FXMacroData API 서버에 대한 직접 연결입니다. - 이 을 사용하지 마 fxmacrodata.com/api/... SSE 경로, 그 경로는 CDN 계층을 통과하여 응답을 버퍼하고 라이브 스트림을 끊는 것입니다.

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

선택적인 쿼리 매개 변수로 피드를 좁힐 수 있습니다:

  • currencies 오점으로 구분된 목록: usd,eur,gbp
  • indicators 오점으로 구분된 목록: inflation,policy_rate
  • api_key USD 외의 통화에 필요한 전문 API 키
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}

SSE 메시지는 전체 데이터 페이로드가 아닌 운영 트리거입니다. 수신 후 짝이 되는 발표 최종 지점에 전화하십시오. API 데이터 문서 새로운 값을 포함한 전체 시간 계열을 검색하기 위해서입니다.


브라우저 예제

브라우저에서, 네이티브 EventSource 자동으로 재결합을 처리합니다. 다음 예제에서 를 구독합니다. 농부 외의 USD 임금 그리고 미국 달러 인플레이션 무료 인증되지 않은 계층을 사용:

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 키가 필요 없습니다. api.fxmacrodata.com/v1/stream/events 인증 매개 변수가 없죠

직업계획

모든 18개 통화. 통화와 지표의 조합에 따라 필터링. ?api_key=YOUR_KEY 질의 문자열에


다음으로 무엇을 만들지

SSE 스트림은 기존 REST 워크플로우 위에 트리거 레이어로 가장 잘 작동합니다. 실용적인 패턴은 다음과 같습니다.

  • 실시간 대시보드 카드 업데이트 새로운 데이터가 도착하는 순간 하나의 패널을 갱신하는 것이 아니라 N 분마다 투표를 합니다.
  • 거래 알림 가장 최근의 릴리스를 당신의 임계값과 비교하고 즉시 Slack 또는 webhook 알림을 발사하십시오.
  • 캐시 무효화 SSE 이벤트를 다시 검색하고 업데이트 된 지표 기록을 저장하는 신호로 사용하십시오.
  • 과 결합 발매 일정은 다음으로 예정된 것을 알고 SSE를 실제 게시할 때 실시간 확인으로 사용하십시오.

단계별로 실행하는 전체 워크서브를 보기 SSE 스트리밍 가이드-


FXMacroData 팀

Blogroll

AI Answer-Ready

Key Facts

Page
Introducing FXmacrodata Sse Streaming
Section
Articles
Canonical URL
https://fxmacrodata.com/ko/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.