Add a Market Gate node between the risk debate and Portfolio Manager that verifies the target exchange is open before trade execution. - New `market_gate.py` with `check_market_state()` and `create_market_gate()` - Calls Headless Oracle /v5/demo (free, no API key required) - Fail-closed: network errors default to UNKNOWN (blocked) - Ticker suffix → MIC mapping for 22 global exchanges - Injects [MARKET GATE] advisory into risk debate history - Optional via `use_market_gate` config flag (default: True) - 12 new tests covering MIC resolution, HTTP mocking, and node behavior - Zero new dependencies (stdlib urllib only) Resolves #514 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| test_google_api_key.py | ||
| test_market_gate.py | ||
| test_model_validation.py | ||
| test_ticker_symbol_handling.py | ||