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
How To Use Fxmacrodata Endpoints And Authentication image
Share headline card X LinkedIn Email
Download

Implementation

How-To Guides

How To Use Fxmacrodata Endpoints And Authentication

A practical end-to-end guide to authenticating with FXMacroData, choosing the right endpoint families, and building a production-ready macro data workflow.

他言語版 English
Share article X LinkedIn Email

このガイドの終わりまでに,正しい認証,それぞれのタスクのための適切なエンドポイントファミリーを選択し,ルート構造や指標カバーを推測することなくFXMacroData APIを通じて生産準備の良いリクエストを行うことができます.

条件

  • FXMacroData アカウントと非USD リクエストの API キー
  • ターミナル curl Python/Node.jsのようなランタイムで
  • JSON 応答と URL 問い合わせパラメータの基本的な熟知
  • リアルタイムで記録を /ドキュメント/

ステップ 1 - 生産ベース URL から開始

公開例は,生産APIベースから開始すべきです.

https://fxmacrodata.com/api/v1

最も使うエンドポイントファミリーは:

  • /announcements/{currency}/{indicator} 精度で公開された値の announcement_datetime
  • /calendar/{currency} 発売予定のタイムスタンプ
  • /catalogue/{currency} サポートされた指標の発見性について
  • /cot/{currency} 取引者のコミットメントのポジショニング
  • /commodities/{indicator} 商品・エネルギーシリーズ
  • /forex/{pair} ほら /market-sessions 市場状況について

ステップ 2 - 問い合わせパラメータで正常に認証

FXMacroData は,公開利用例でクエリパラメータ認証を使用します:

?api_key=YOUR_API_KEY

USD端点へのアクセスには鍵がないが,非USDルートには有効な鍵が必要です.

# USD endpoint (no key required)
curl "https://fxmacrodata.com/api/v1/announcements/usd/inflation"

# Non-USD endpoint (key required)
curl "https://fxmacrodata.com/api/v1/announcements/aud/policy_rate?api_key=YOUR_API_KEY"

ステップ3 - コーディングする前に,何が利用可能か調べる

カタログのルートに最初に呼び出す場合,通貨の指標がどこにあるかわからない場合.これはハードコーディングの仮定を避ける.

curl "https://fxmacrodata.com/api/v1/catalogue/eur?api_key=YOUR_API_KEY"

指示ページのインデックスを 文書指標指数 経路と予想されるフィールドを確認します.


ステップ4 - 発表エンドポイントから公開されたデータを抽出する

発表エンドポイントは,上位レベルのオブジェクト+aを返します. data 履歴書に記入されている.各行には,期間終了が記入されています. dateほら valほら ほろ announcement_datetime タイムスタンプ

curl "https://fxmacrodata.com/api/v1/announcements/gbp/unemployment?api_key=YOUR_API_KEY"
{
  "currency": "GBP",
  "indicator": "unemployment",
  "has_official_forecast": false,
  "start_date": "2025-01-31",
  "end_date": "2026-03-31",
  "data": [
    {
      "date": "2026-01-31",
      "val": 4.39,
      "announcement_datetime": 1770521400
    }
  ]
}

詳細な指標語義と単位については,端点ページをチェックしてください. 政策金利ドル ほら ユーロインフレほら


ステップ 5 - イベント駆動ワークフローのリリースカレンダーを使用

公開時に採点する代わりに 収集を予定できます

curl "https://fxmacrodata.com/api/v1/calendar/usd?indicator=non_farm_payrolls"

強力なパターンは: クエリカレンダー -> 次を読む announcement_datetime リリース時にマッチング広告ルートを取ります.


ステップ6 - 追加のエンドポイントファミリーを追加する

域特有のルートでカバーを拡張します. ネットワークのネットワークの接続は,

  • コーティング /api/v1/cot/{currency} 期貨ポジショニングの文脈
  • 金属: /api/v1/commodities/{indicator} 金,銀,プラチナ,および関連する安全な避難民投入物
  • フォレックス /api/v1/forex/{pair} マクロリリースとのスポットアライナインメント
  • 市場セッション: /api/v1/market-sessions セッション状態を意識する自動化
curl "https://fxmacrodata.com/api/v1/cot/usd"
curl "https://fxmacrodata.com/api/v1/commodities/gold"
curl "https://fxmacrodata.com/api/v1/forex/eurusd"
curl "https://fxmacrodata.com/api/v1/market-sessions"

ステップ7 - 端から端へのPython例

The snippet below checks availability, fetches one indicator series, and returns the latest print.

import requests

BASE = "https://fxmacrodata.com/api/v1"
API_KEY = "YOUR_API_KEY"


def fetch_latest(currency: str, indicator: str, api_key: str | None = None) -> dict | None:
    params = {}
    if api_key:
        params["api_key"] = api_key

    catalogue = requests.get(f"{BASE}/catalogue/{currency}", params=params, timeout=10)
    catalogue.raise_for_status()

    endpoint = requests.get(
        f"{BASE}/announcements/{currency}/{indicator}",
        params=params,
        timeout=10,
    )
    endpoint.raise_for_status()

    rows = endpoint.json().get("data", [])
    return rows[-1] if rows else None


latest = fetch_latest("aud", "policy_rate", API_KEY)
print(latest)

建設する

更新プログラムに追加する. 更新プログラムをインストールする上で,このプログラムが実行されるようにします. リリースカレンダー API を使う方法 新しいマクロデータが出版されると システムが正確に反応します

Blogroll

AI Answer-Ready

Key Facts

Page
How To Use FXmacrodata Endpoints And Authentication
Section
Articles
Canonical URL
https://fxmacrodata.com/ja/articles/how-to-use-fxmacrodata-endpoints-and-authentication
Source
FXMacroData editorial and official publisher references
Last Updated
2026-06-15 11:01 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 How To Use FXmacrodata Endpoints And Authentication 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.