get_equity_flow
Monitor real-time institutional order flow for any US stock. Detect buy/sell pressure, block trades, and dumping signals with confidence scores.
Instructions
Get real-time institutional orderflow for a US equity stock.
Returns signal (BUY_PRESSURE/SELL_PRESSURE/WHALE_EXIT/EMERGENCY_DUMP),
confidence score, large sell orders count, block trades, toxicity,
and flags like WATERFALL_DUMP, PULLED_BID_WALL_SPOOF.
Args:
symbol: Stock ticker (e.g., "SPY", "AAPL", "TSLA", "NVDA", "MSFT")Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- horus_mcp_public.py:109-123 (handler)The main handler for the 'get_equity_flow' tool. It is decorated with @mcp.tool() (which also serves as registration), takes a symbol parameter, cleans it to uppercase, calls the _fetch helper to hit the /v1/flow/equity/{symbol} endpoint, and returns JSON.
# ─── Tool 2: Equity Flow ───────────────────────────────── @mcp.tool() async def get_equity_flow(symbol: str) -> str: """Get real-time institutional orderflow for a US equity stock. Returns signal (BUY_PRESSURE/SELL_PRESSURE/WHALE_EXIT/EMERGENCY_DUMP), confidence score, large sell orders count, block trades, toxicity, and flags like WATERFALL_DUMP, PULLED_BID_WALL_SPOOF. Args: symbol: Stock ticker (e.g., "SPY", "AAPL", "TSLA", "NVDA", "MSFT") """ clean = symbol.upper() data = await _fetch(f"/v1/flow/equity/{clean}") return json.dumps(data, indent=2) - horus_mcp_public.py:110-110 (registration)Registration of the tool via the @mcp.tool() decorator on the get_equity_flow function.
@mcp.tool() - horus_mcp_public.py:57-89 (helper)The _fetch helper function used by get_equity_flow to make the actual HTTP request to the Horus RapidAPI endpoint and handle error/rate-limit responses.
# ─── Helper ─────────────────────────────────────────────── 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)}" }