1. Zero-Dependency Standard Library (urllib) or requests

Call GET /api/v1/pairs/{symbol}?compact=1 before submitting any order. Check stale == False and prop_safe_to_trade == True (enforcing T-5m PRE_NEWS, 5m post-news prop rules, and all 4 VETO shields).

2. Built-In TTL Caching & Timeout Guard

Cache responses locally for 15 seconds per symbol so high-frequency tick loops stay well below rate limits while receiving fresh macro status updates within seconds of every CPI or NFP print.

3. Native MCP Support for Python AI Trading Agents

Building with OpenAI Agents SDK, Anthropic SDK, or LangGraph? Connect directly to POST https://forexnewsradar.com/mcp (free live EUR/USD with zero key) and call check_prop_trade_gate natively.

Production Fail-Closed Python Prop-Firm News Filter (stdlib urllib — Runs Immediately)
# Zero-dependency Python 3 prop-firm macro news gate
# Works immediately with NO API key on EURUSD ($0 free forever):
#   https://forexnewsradar.com/api/v1/pairs/EURUSD?compact=1
import json
import os
import time
import urllib.error
import urllib.request

_CACHE = {}

def check_prop_gate(symbol: str = "EURUSD", ttl_sec: int = 15) -> dict:
    now = time.monotonic()
    cached = _CACHE.get(symbol)
    if cached and (now - cached["ts"]) < ttl_sec:
        return cached["val"]

    api_key = os.getenv("FNR_API_KEY", "").strip()
    headers = {"Accept": "application/json", "User-Agent": "fnr-python-bot/1.0"}
    if api_key:
        headers["Authorization"] = f"Bearer {api_key}"

    url = f"https://forexnewsradar.com/api/v1/pairs/{symbol}?compact=1"
    req = urllib.request.Request(url, headers=headers)
    try:
        with urllib.request.urlopen(req, timeout=5) as resp:
            payload = json.loads(resp.read().decode("utf-8"))
        allowed = (not payload.get("stale", True)) and bool(payload.get("prop_safe_to_trade", False))
        out = {
            "allowed": allowed,
            "status": payload.get("status", "UNKNOWN"),
            "wait_sec": int(payload.get("prop_wait_sec") or 0),
            "surprise_z": payload.get("surprise_z"),
        }
        _CACHE[symbol] = {"ts": now, "val": out}
        return out
    except urllib.error.HTTPError as exc:
        # Fail-closed on 402 (locked pair — unlock at https://forexnewsradar.com/?unlock=ALL) or 429/5xx
        return {"allowed": False, "status": f"HTTP_{exc.code}", "wait_sec": 60, "surprise_z": None}
    except Exception:
        return {"allowed": False, "status": "NETWORK_ERROR", "wait_sec": 30, "surprise_z": None}

if __name__ == "__main__":
    print(check_prop_gate("EURUSD"))
VIDEO FIELD GUIDE #19 0:47 · 1080p HD

Fix MQL5 Suffix Bugs (XAUUSD.pro) With 250B ?compact=1 JSON

Shows how automatic broker ticker normalization (.pro, m, _ecn) and the tiny 250-byte ?compact=1 JSON endpoint keep MQL5 WebRequest loops fast and bug-free.

QUANT DESK FIELD NOTE · Broker Symbol Heterogeneity & Low-Footprint Edge Parsing in MQL5

Execution venues rarely standardize instrument identifiers: Spot Gold trades as XAUUSD, XAUUSDm, XAUUSD.pro, XAUUSD_ecn, or XAU/USD across retail and institutional bridges. Exact-string lookup tables inside custom EAs fail silently when users deploy bots onto a new broker feed, throwing unknown-symbol errors or skipping news protection entirely. Server-side prefix and suffix normalization inside /api/v1/pairs/{SYMBOL} resolves messy broker strings to canonical feeds cleanly, while ?compact=1 trims payload weight down to roughly 250 flat JSON bytes so MQL5 StringFind checks parse in microseconds.

Related MT5, Prop-Firm & MCP Engineering Playbooks

Inspect Live Macro & VETO Feeds by Instrument