Hive Intelligence

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:

  1. Monitor prices with get_price
  2. Analyze market trends with get_coins_market_data
  3. Check trending tokens with get_trending
  4. Verify token security with get_token_security
  5. 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 prices
  • get_coins_market_data - Market metrics
  • get_trending - Trending detection
  • get_token_security - Risk analysis

DeFi Yield Optimization

Yield Farming Analyzer

Find and compare yield opportunities across DeFi protocols.

Workflow:

  1. Fetch available yield pools with get_yield_pools
  2. Get protocol TVL with get_protocols
  3. Calculate risk-adjusted returns
  4. 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 opportunities
  • get_protocols - Protocol TVL and metrics
  • get_protocol - Individual protocol data

Portfolio Management

Multi-Chain Portfolio Tracker

Track assets across multiple blockchains in real-time.

Workflow:

  1. Get wallet balances with get_wallet_balance
  2. Fetch DeFi positions with get_wallet_positions
  3. Get current prices for all assets
  4. 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 holdings
  • get_wallet_positions - DeFi protocol positions
  • get_wallet_transactions - Transaction tracking

Security & Risk Analysis

Token Security Scanner

Automatically scan tokens for potential risks before trading.

Workflow:

  1. Input contract address
  2. Run security check with get_token_security
  3. Analyze holder distribution
  4. 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 analysis
  • get_token_holders - Holder distribution
  • get_token_info - Token metadata

NFT Intelligence

NFT Collection Analyzer

Track NFT collection performance and identify opportunities.

Workflow:

  1. Get collection stats with get_nft_collection
  2. Monitor floor prices with get_floor_price
  3. Analyze sales trends with get_collection_sales
  4. 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 metrics
  • get_floor_price - Floor price tracking
  • get_collection_sales - Sales history

Research & Analytics

Market Research Assistant

Build an AI assistant that answers crypto market questions.

Workflow:

  1. Parse user question
  2. Determine required data sources
  3. Fetch relevant data
  4. 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 data
  • get_trending - Trending tokens
  • get_yield_pools - Yield comparisons
  • get_token_security - Security checks

Social Sentiment Analysis

Sentiment Tracker

Monitor social sentiment around crypto projects.

Workflow:

  1. Fetch social metrics for tokens
  2. Track sentiment changes over time
  3. Correlate with price movements
  4. Generate alerts on sentiment shifts

Tools Used:

  • get_social_metrics - Social metrics
  • get_social_dominance - Dominance scoring
  • get_influencer_posts - Influencer tracking

Getting Started

  1. Choose your use case from the examples above
  2. Set up your environment with any HTTP client
  3. Start with basic tools and expand as needed
  4. Test thoroughly before production deployment

Need Help?

Previous
Data Sources