Technical
Use Cases
Use Cases
Explore real-world applications built with Hive Intelligence.
Trading & Market Analysis
AI Trading Bot
Build intelligent trading agents that analyze market conditions and execute strategies.
Workflow:
- Monitor prices with
get_price - Analyze market trends with
get_coins_market_data - Check trending tokens with
get_trending - Verify token security with
get_token_security - Execute trades based on analysis
Example Implementation:
import requests
API_URL = "https://api.hiveintelligence.xyz/api/execute"
def call_hive(tool_name: str, arguments: dict) -> dict:
response = requests.post(API_URL, json={
"toolName": tool_name,
"arguments": arguments
})
return response.json()
def analyze_trading_opportunity(token_id: str):
# Get current price and market data
price = call_hive("get_price", {
"ids": token_id,
"vs_currencies": "usd",
"include_24hr_change": "true"
})
# Get market context
market = call_hive("get_coins_market_data", {
"vs_currency": "usd",
"ids": token_id
})
# Check if trending
trending = call_hive("get_trending", {})
is_trending = any(
coin["item"]["id"] == token_id
for coin in trending.get("data", {}).get("coins", [])
)
return {
"price": price["data"][token_id]["usd"],
"change_24h": price["data"][token_id].get("usd_24h_change"),
"market_cap": market["data"][0]["market_cap"],
"volume": market["data"][0]["total_volume"],
"is_trending": is_trending
}
Tools Used:
get_price- Real-time pricesget_coins_market_data- Market metricsget_trending- Trending detectionget_token_security- Risk analysis
DeFi Yield Optimization
Yield Farming Analyzer
Find and compare yield opportunities across DeFi protocols.
Workflow:
- Fetch available yield pools with
get_yield_pools - Get protocol TVL with
get_protocols - Calculate risk-adjusted returns
- Monitor positions over time
Example Implementation:
def find_best_yields(chain: str = "ethereum", min_tvl: int = 1000000):
# Get all yield pools
pools = call_hive("get_yield_pools", {
"chain": chain
})
# Get protocol data for risk assessment
protocols = call_hive("get_protocols", {})
protocol_tvl = {p["name"].lower(): p["tvl"] for p in protocols.get("data", [])}
# Filter and rank opportunities
opportunities = []
for pool in pools.get("data", []):
if pool.get("tvlUsd", 0) >= min_tvl:
protocol_name = pool.get("project", "").lower()
opportunities.append({
"pool": pool["symbol"],
"protocol": pool["project"],
"apy": pool["apy"],
"tvl": pool["tvlUsd"],
"protocol_tvl": protocol_tvl.get(protocol_name, 0),
"chain": chain
})
# Sort by APY
return sorted(opportunities, key=lambda x: x["apy"], reverse=True)[:10]
Tools Used:
get_yield_pools- Available yield opportunitiesget_protocols- Protocol TVL and metricsget_protocol- Individual protocol data
Portfolio Management
Multi-Chain Portfolio Tracker
Track assets across multiple blockchains in real-time.
Workflow:
- Get wallet balances with
get_wallet_balance - Fetch DeFi positions with
get_wallet_positions - Get current prices for all assets
- Calculate total portfolio value
Example Implementation:
def get_portfolio_value(wallet_address: str):
# Get token balances
balances = call_hive("get_wallet_balance", {
"address": wallet_address
})
# Get DeFi positions
positions = call_hive("get_wallet_positions", {
"address": wallet_address
})
# Calculate totals
token_value = sum(
token.get("usd_value", 0)
for token in balances.get("data", {}).get("tokens", [])
)
defi_value = sum(
position.get("net_usd_value", 0)
for position in positions.get("data", {}).get("positions", [])
)
return {
"wallet": wallet_address,
"token_holdings": token_value,
"defi_positions": defi_value,
"total_value": token_value + defi_value,
"token_count": len(balances.get("data", {}).get("tokens", [])),
"position_count": len(positions.get("data", {}).get("positions", []))
}
Tools Used:
get_wallet_balance- Wallet token holdingsget_wallet_positions- DeFi protocol positionsget_wallet_transactions- Transaction tracking
Security & Risk Analysis
Token Security Scanner
Automatically scan tokens for potential risks before trading.
Workflow:
- Input contract address
- Run security check with
get_token_security - Analyze holder distribution
- Generate risk report
Example Implementation:
def scan_token_security(contract_address: str, chain_id: str = "1"):
# Get security analysis
security = call_hive("get_token_security", {
"contract_addresses": contract_address,
"chain_id": chain_id
})
# Get holder distribution
holders = call_hive("get_token_holders", {
"contract_address": contract_address,
"chain_id": chain_id,
"limit": 10
})
# Build risk assessment
data = security.get("data", {})
risks = []
if data.get("is_honeypot"):
risks.append("CRITICAL: Honeypot detected")
if data.get("is_mintable"):
risks.append("WARNING: Token is mintable")
sell_tax = float(data.get("sell_tax", "0"))
if sell_tax > 10:
risks.append(f"WARNING: High sell tax ({sell_tax}%)")
buy_tax = float(data.get("buy_tax", "0"))
if buy_tax > 10:
risks.append(f"WARNING: High buy tax ({buy_tax}%)")
# Check holder concentration
holder_data = holders.get("data", {}).get("holders", [])
if holder_data:
top_holder = holder_data[0]
if float(top_holder.get("percentage", 0)) > 50:
risks.append("WARNING: High holder concentration")
return {
"contract": contract_address,
"is_safe": len([r for r in risks if "CRITICAL" in r]) == 0,
"risks": risks,
"security_data": data,
"top_holders": holder_data[:5]
}
Tools Used:
get_token_security- Security analysisget_token_holders- Holder distributionget_token_info- Token metadata
NFT Intelligence
NFT Collection Analyzer
Track NFT collection performance and identify opportunities.
Workflow:
- Get collection stats with
get_nft_collection - Monitor floor prices with
get_floor_price - Analyze sales trends with
get_collection_sales - Track holder distribution
Example Implementation:
def analyze_nft_collection(collection_address: str, chain_id: str = "1"):
# Get collection statistics
stats = call_hive("get_nft_collection", {
"collection_address": collection_address,
"chain_id": chain_id
})
# Get floor price
floor = call_hive("get_floor_price", {
"collection_address": collection_address,
"chain_id": chain_id
})
# Get recent sales
sales = call_hive("get_collection_sales", {
"collection_address": collection_address,
"chain_id": chain_id,
"limit": 20
})
# Calculate metrics
sales_data = sales.get("data", {}).get("sales", [])
avg_sale_price = sum(
s.get("price_usd", 0) for s in sales_data
) / len(sales_data) if sales_data else 0
collection_data = stats.get("data", {})
return {
"collection": collection_address,
"floor_price": floor.get("data", {}).get("floor_price"),
"total_supply": collection_data.get("total_supply"),
"holders": collection_data.get("holders"),
"average_sale": avg_sale_price,
"recent_sales": len(sales_data)
}
Tools Used:
get_nft_collection- Collection metricsget_floor_price- Floor price trackingget_collection_sales- Sales history
Research & Analytics
Market Research Assistant
Build an AI assistant that answers crypto market questions.
Workflow:
- Parse user question
- Determine required data sources
- Fetch relevant data
- Generate insights
Example Use Cases:
- "What are the top DeFi protocols by TVL?"
- "Show me trending tokens in the last 24 hours"
- "Compare yields on Ethereum vs Arbitrum"
- "Is this token safe to trade?"
Tools Commonly Used:
get_protocols- DeFi protocol dataget_trending- Trending tokensget_yield_pools- Yield comparisonsget_token_security- Security checks
Social Sentiment Analysis
Sentiment Tracker
Monitor social sentiment around crypto projects.
Workflow:
- Fetch social metrics for tokens
- Track sentiment changes over time
- Correlate with price movements
- Generate alerts on sentiment shifts
Tools Used:
get_social_metrics- Social metricsget_social_dominance- Dominance scoringget_influencer_posts- Influencer tracking
Getting Started
- Choose your use case from the examples above
- Set up your environment with any HTTP client
- Start with basic tools and expand as needed
- Test thoroughly before production deployment
Need Help?
- Tools Reference - Complete tool documentation
- Integration Libraries - Language-specific guides
- FAQ - Common questions
- Telegram - Community support