Use Cases
Use Case: Real-Time Market Intelligence for AI Agents
The Problem
Your AI agent needs to build a market brief combining spot prices from CoinGecko, exchange-level order flow from CCXT, and DeFi TVL from DeFiLlama. Three providers, three APIs, three schemas. Each has its own auth flow, rate limits, response shape, and failure modes. Your agent spends more time wrestling with API plumbing than doing actual analysis.
Without Hive
Integrating three providers means three different client libraries, three authentication patterns, and three response schemas to normalize before your agent can reason over the data.
import requests
import ccxt
# --- Provider 1: CoinGecko for spot prices ---
cg = requests.get("https://api.coingecko.com/api/v3/simple/price",
params={"ids": "bitcoin,ethereum", "vs_currencies": "usd"}).json()
# --- Provider 2: CCXT for exchange order flow ---
exchange = ccxt.binance()
ticker = exchange.fetch_ticker("BTC/USDT")
# --- Provider 3: DeFiLlama for TVL ---
tvl = requests.get("https://api.llama.fi/v2/protocols").json()
top_protocols = sorted(tvl, key=lambda x: x.get("tvl", 0), reverse=True)[:5]
# Now you need to normalize three different response shapes
# before your agent can build a coherent market brief.
# Each provider has its own rate limits, error codes, and downtime patterns.
# If CoinGecko rate-limits you, your entire pipeline stalls.
That is roughly 30 lines before you even start analysis, and you still need error handling, retry logic, and schema normalization for each provider.
With Hive
Three tool calls through one connection. One API key. One response schema. One rate limiter.
import requests
def hive(tool, args):
r = requests.post("https://mcp.hiveintelligence.xyz/api/v1/execute",
headers={"Authorization": "Bearer YOUR_HIVE_API_KEY"},
json={"tool": tool, "args": args}, timeout=30)
return r.json()
prices = hive("get_price", {"ids": "bitcoin,ethereum", "vs_currencies": "usd"})
ticker = hive("get_ticker", {"exchange": "binance", "symbol": "BTC/USDT"})
tvl = hive("get_protocol_tvl", {})
Same data. One auth flow. One error format. Your agent focuses on building the market brief, not managing three provider integrations.
Available Market Intelligence Tools
| Tool | What it returns |
|---|---|
get_price | Spot prices for any token pair |
get_coins_market_data | Market cap, volume, and 24h change across tokens |
get_gainers_losers | Top movers in either direction |
get_ticker | Exchange-level order flow and spread data |
get_open_interest | Derivatives open interest by exchange |
get_protocol_tvl | DeFi protocol TVL rankings and history |
get_global_stats | Aggregate crypto market statistics |
get_yield_pools | DeFi yield opportunities across protocols |
A Complete Market Brief Agent
Here is the full loop — the kind of daily briefing a portfolio manager or research desk would ask an agent to assemble every morning. Five tool calls through one connection, wrapped in an MCP-compatible prompt.
import json, requests
def hive(tool, args):
r = requests.post("https://mcp.hiveintelligence.xyz/api/v1/execute",
headers={"Authorization": "Bearer YOUR_HIVE_API_KEY"},
json={"tool": tool, "args": args}, timeout=30)
r.raise_for_status()
return r.json()["data"]
def daily_brief(watchlist=("bitcoin", "ethereum", "solana")):
ids = ",".join(watchlist)
prices = hive("get_price", {"ids": ids, "vs_currencies": "usd"})
movers = hive("get_gainers_losers", {"limit": 5})
protocols = hive("get_protocol_tvl", {})
oi = hive("get_open_interest", {"exchange": "binance"})
polymkt = hive("codex_prediction_market_stats", {"limit": 3})
return {
"watchlist": prices,
"top_movers": movers,
"top_tvl": protocols[:5],
"derivatives_oi": oi,
"prediction_signals": polymkt,
}
brief = daily_brief()
print(json.dumps(brief, indent=2))
The same agent through MCP (Claude, Cursor, ChatGPT) needs zero Python — just connect to https://mcp.hiveintelligence.xyz/mcp and prompt:
"Build a daily crypto market brief. Cover spot prices for BTC, ETH, SOL; top 5 gainers and losers over 24h; the top 5 DeFi protocols by TVL with their 7-day change; Binance perpetual open interest; and the 3 hottest Polymarket prediction markets with volume. Return as markdown."
The agent discovers the relevant tools through tools/list, chains them, and returns a citable brief. No function schemas to hand-write.
What the Output Looks Like
A typical response assembles into a structured brief that an LLM can summarize or a downstream system can ingest:
{
"watchlist": {
"bitcoin": { "usd": 71234.52, "usd_24h_change": 2.41 },
"ethereum": { "usd": 3890.17, "usd_24h_change": 1.85 },
"solana": { "usd": 217.88, "usd_24h_change": 4.12 }
},
"top_movers": [ /* ... */ ],
"top_tvl": [ /* Aave, Lido, EigenLayer, Uniswap, Maker */ ],
"derivatives_oi": { "btc_usdt_perp": 12_400_000_000, "eth_usdt_perp": 6_900_000_000 },
"prediction_signals": [ /* Trump 2028, ETH $5k by EOY, etc. */ ]
}
Every call carries a fetched_at timestamp, so downstream agents know exactly when the snapshot was taken and can avoid stale-data hallucinations. Rate limits, provider failovers, and schema drift are all handled upstream by Hive.
Why This Matters
Every additional provider your agent integrates adds auth configuration, rate-limit handling, schema normalization, and a new failure mode. Hive collapses that to one connection:
- One API key instead of three sets of credentials
- One rate limiter instead of juggling per-provider quotas
- One response schema instead of writing normalization glue for each source
- One error format instead of catching provider-specific exceptions
- Runtime tool discovery via MCP
tools/list— when Hive adds a new market data tool, your agent picks it up without a redeploy
Your agent focuses on analysis, not API plumbing. Builders who move a research or market-intel agent to Hive typically collapse a 200–400 line provider-integration module into a 20-line hive() helper and a thin dispatch function.