Skip to main content
Glama
horustechltd

horus-flow-mcp

by horustechltd

get_crypto_flow

Analyze real-time institutional order flow for any cryptocurrency trading pair. Detect BUY/SELL pressure, whale intent, and spoofing flags from Binance L2 orderbook and trade feeds.

Instructions

Get real-time institutional orderflow for a cryptocurrency.

Returns signal (BUY_PRESSURE/SELL_PRESSURE/WHALE_EXIT/EMERGENCY_DUMP),
confidence score, bid/ask depth metrics, whale intent, toxicity level,
and flags like SPOOFING_DETECTED, BID_WALL_TRAP, DEPTH_COLLAPSE.

Args:
    symbol: Trading pair (e.g., "BTCUSDT", "ETHUSDT", "SOLUSDT")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the 'get_crypto_flow' tool. It takes a symbol (e.g., BTCUSDT), normalizes it, fetches data from the /v1/flow/crypto/{clean} RapidAPI endpoint via the _fetch helper, and returns JSON-formatted orderflow intelligence.
    async def get_crypto_flow(symbol: str) -> str:
        """Get real-time institutional orderflow for a cryptocurrency.
        
        Returns signal (BUY_PRESSURE/SELL_PRESSURE/WHALE_EXIT/EMERGENCY_DUMP),
        confidence score, bid/ask depth metrics, whale intent, toxicity level,
        and flags like SPOOFING_DETECTED, BID_WALL_TRAP, DEPTH_COLLAPSE.
        
        Args:
            symbol: Trading pair (e.g., "BTCUSDT", "ETHUSDT", "SOLUSDT")
        """
        clean = symbol.replace("/", "").replace("-", "").upper()
        data = await _fetch(f"/v1/flow/crypto/{clean}")
        return json.dumps(data, indent=2)
  • The @mcp.tool() decorator registers get_crypto_flow as an MCP tool on the FastMCP server instance.
    @mcp.tool()
    async def get_crypto_flow(symbol: str) -> str:
  • The _fetch helper function used by get_crypto_flow to make HTTP requests to the RapidAPI endpoint and handle errors (401/403, 429, network errors).
    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)}"
                }
  • The docstring serves as the schema/description for the tool, documenting the symbol parameter and return values (signals, confidence, bid/ask depth, etc.).
    """Get real-time institutional orderflow for a cryptocurrency.
    
    Returns signal (BUY_PRESSURE/SELL_PRESSURE/WHALE_EXIT/EMERGENCY_DUMP),
    confidence score, bid/ask depth metrics, whale intent, toxicity level,
    and flags like SPOOFING_DETECTED, BID_WALL_TRAP, DEPTH_COLLAPSE.
    
    Args:
        symbol: Trading pair (e.g., "BTCUSDT", "ETHUSDT", "SOLUSDT")
    """
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses the output types (signal, confidence, depth metrics, flags) and notes it is real-time. It does not mention rate limits or permissions, but for a read-only data tool, this is adequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is four sentences, starting with the core purpose and then listing return fields and the argument. It is front-loaded and every sentence adds value. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (1 required parameter) and the existence of an output schema, the description provides a thorough overview of return values and the argument. It covers all necessary context for an agent to select and invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has only 'symbol' with type string and 0% description coverage. The description adds concrete examples ('BTCUSDT', 'ETHUSDT', 'SOLUSDT') and clarifies the trading pair format, which is essential for correct invocation. This fully compensates for the schema's lack of detail.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it 'Get real-time institutional orderflow for a cryptocurrency,' which is a specific verb+resource combination. It distinguishes itself from sibling tools like 'scan_crypto_flow' by focusing on a single symbol and providing detailed output metrics.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implicitly tells when to use: when needing real-time orderflow for a specific cryptocurrency. However, it does not explicitly state when not to use it or compare with alternative siblings like 'scan_crypto_flow' for scanning multiple symbols.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/horustechltd/horus-flow-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server