get_market_climate
Determine current market mode (CHOP, TREND, RANGE) and health (HEALTHY, FRAGILE) to inform trading strategy and position sizing adjustments.
Instructions
Get current market mode and health status.
Returns market mode (CHOP, TREND, RANGE) and health (HEALTHY, FRAGILE).
CHOP = only scalps work, TREND = directional trades, RANGE = mean-reversion.
If health is FRAGILE, reduce all position sizes.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- horus_mcp_public.py:241-249 (handler)The handler function for the 'get_market_climate' tool. It fetches market climate data (CHOP/TREND/RANGE mode and HEALTHY/FRAGILE health status) from the /v1/intelligence/climate endpoint and returns it as JSON.
async def get_market_climate() -> str: """Get current market mode and health status. Returns market mode (CHOP, TREND, RANGE) and health (HEALTHY, FRAGILE). CHOP = only scalps work, TREND = directional trades, RANGE = mean-reversion. If health is FRAGILE, reduce all position sizes. """ data = await _fetch("/v1/intelligence/climate") return json.dumps(data, indent=2) - horus_mcp_public.py:240-240 (registration)Registration of get_market_climate as an MCP tool via the @mcp.tool() decorator on line 240.
@mcp.tool() - horus_mcp_public.py:58-89 (helper)The _fetch helper used by get_market_climate to make the HTTP request to the RapidAPI endpoint and handle errors (auth, rate limiting, network).
async def _fetch(endpoint: str) -> dict: """Fetch data from the live RapidAPI endpoint.""" async with httpx.AsyncClient(timeout=10.0) as client: try: resp = await client.get( f"{RAPIDAPI_BASE_URL}{endpoint}", headers=HEADERS, ) if resp.status_code == 200: return resp.json() elif resp.status_code in [401, 403]: return { "error": True, "signal": "UNAUTHORIZED", "detail": "Invalid or missing RAPIDAPI_KEY. Please verify your RapidAPI subscription." } elif resp.status_code == 429: return { "error": True, "signal": "RATE_LIMITED", "detail": "You have exceeded your RapidAPI quota. Please upgrade your plan." } return { "error": True, "status_code": resp.status_code, "detail": resp.text, } except Exception as e: return { "error": True, "detail": f"Network Error: {str(e)}" }