360 Secure SkillHub
360 安全技能中心

fxmacrodata-calendar

通过Python脚本调用FXMacroData API,按币种和事件层级拉取官方宏观发布日历,校验数据质量与时间戳,并输出结构化事件列表用于交易计划中的风险窗口提示。

分类:数据
tradermonty
热度 41.86
最近更新 2026-11-13 05:29:57

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add tradermonty/claude-trading-skills/fxmacrodata-calendar
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
fxmacrodata-calendar
description
Fetch official FXMacroData macro release-calendar events for trade planning, macro regime checks, and event-risk filters. Use before CPI, NFP, GDP, PCE, retail sales, PMI, and central-bank decision windows.

FXMacroData Calendar

Retrieve official-source macro release-calendar events from FXMacroData. Use this skill when a trade plan needs event timing, confirmed release dates, or a top-tier macro risk check.

Prerequisites

  • FXMacroData API key: Optional. Set FXMACRODATA_API_KEY for authenticated endpoints. Public USD calendar rows can be fetched without a key.
  • Other API keys: None used.
  • Python: 3.9+ with the standard library only (see requirements.txt).
  • Network: Access to https://api.fxmacrodata.com/v1.

Workflow

  1. Run the calendar script:

    python3 skills/fxmacrodata-calendar/scripts/fetch_calendar.py --currency usd --min-tier 1
    
  2. Review events[] for top-tier releases.

    Treat a nonzero exit as an unverified event-risk state, never as an empty calendar. Only a successful response containing events: [] establishes that no matching events were returned. The client accepts results only when the response currency matches the request and data_quality confirms an official, current, non-proxy, non-fallback, timestamp-complete, point-in-time-safe source. Each event must include an announcement timestamp and a non-empty release identifier.

  3. Fold the event timing into the trade plan:

    • pause new entries around high-impact releases;
    • reduce leverage or position size;
    • schedule follow-up review after the actual value is available;
    • explain which event and timestamp drove the adjustment.

Authentication

Set FXMACRODATA_API_KEY for authenticated FXMacroData endpoints. Public USD calendar rows can be fetched without a key. The client uses the canonical https://api.fxmacrodata.com/v1 endpoint and accepts --min-tier values 1, 2, or 3 only. Live calendar responses currently include market_tier; the skill treats it as an extension field and requires integer values 1 through 3 for filtering, although the current CalendarReleaseRow OpenAPI schema does not declare that field.