get_cross_exchange_flow
Detects market speculation vs real demand by analyzing Futures/Spot ratio and smart money divergence. Identifies hyper-speculation when ratio exceeds 8x, revealing potential vulnerability.
Instructions
Get Futures/Spot ratio, speculation index, and smart money divergence.
Reveals whether the market is driven by speculation (Futures) or real demand (Spot).
Futures/Spot > 8x = HYPER_SPECULATION (vulnerable to flush).
Also shows smart money divergence: are top traders positioned opposite to the crowd?
Args:
symbol: Trading pair (default: BTCUSDT)Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | No | BTCUSDT |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- horus_mcp_public.py:225-236 (handler)Main handler function that fetches cross-exchange flow data (Futures/Spot ratio, speculation index, smart money divergence) from the API endpoint /v1/intelligence/cross-exchange-flow and returns it as a JSON string.
async def get_cross_exchange_flow(symbol: str = "BTCUSDT") -> str: """Get Futures/Spot ratio, speculation index, and smart money divergence. Reveals whether the market is driven by speculation (Futures) or real demand (Spot). Futures/Spot > 8x = HYPER_SPECULATION (vulnerable to flush). Also shows smart money divergence: are top traders positioned opposite to the crowd? Args: symbol: Trading pair (default: BTCUSDT) """ data = await _fetch(f"/v1/intelligence/cross-exchange-flow?symbol={symbol}") return json.dumps(data, indent=2) - horus_mcp_public.py:226-233 (schema)Docstring describes the input parameter (symbol, default BTCUSDT) and the output (Futures/Spot ratio, speculation index, smart money divergence).
"""Get Futures/Spot ratio, speculation index, and smart money divergence. Reveals whether the market is driven by speculation (Futures) or real demand (Spot). Futures/Spot > 8x = HYPER_SPECULATION (vulnerable to flush). Also shows smart money divergence: are top traders positioned opposite to the crowd? Args: symbol: Trading pair (default: BTCUSDT) - horus_mcp_public.py:224-225 (registration)The @mcp.tool() decorator registers this function as an MCP tool named 'get_cross_exchange_flow'.
@mcp.tool() async def get_cross_exchange_flow(symbol: str = "BTCUSDT") -> str: - horus_mcp_public.py:58-89 (helper)The _fetch helper function is used by the handler to make HTTP requests to the RapidAPI endpoint.
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)}" }