Hive Intelligence - Crypto MCP Server

Get Cryptocurrency Price

Get current prices for one or more cryptocurrencies in any supported fiat or crypto currency.

Tool Name: get_price

MCP Endpoint: POST /hive_market_data/mcp

Data Source: CoinGecko


Overview

The get_price tool is the most commonly used endpoint for fetching real-time cryptocurrency prices. It supports:

  • 10,000+ cryptocurrencies including Bitcoin, Ethereum, and all major altcoins
  • 50+ fiat currencies (USD, EUR, GBP, JPY, etc.)
  • Optional market data including market cap, volume, and price changes
  • Batch requests for multiple coins in a single call

Parameters

ParameterTypeRequiredDescription
idsstringYesComma-separated coin IDs (e.g., "bitcoin,ethereum,solana")
vs_currenciesstringYesTarget currencies (e.g., "usd,eur,btc")
include_market_capbooleanNoInclude market capitalization (default: false)
include_24hr_volbooleanNoInclude 24-hour trading volume (default: false)
include_24hr_changebooleanNoInclude 24-hour price change percentage (default: false)
include_last_updated_atbooleanNoInclude last update timestamp (default: false)

Examples

Basic Price Query

Get Bitcoin and Ethereum prices in USD:

curl -X POST https://api.hiveintelligence.xyz/api/execute \
  -H "Content-Type: application/json" \
  -d '{
    "toolName": "get_price",
    "arguments": {
      "ids": "bitcoin,ethereum",
      "vs_currencies": "usd"
    }
  }'

Response:

{
  "bitcoin": {
    "usd": 67234.12
  },
  "ethereum": {
    "usd": 3456.78
  }
}

Price with Market Data

Get price with market cap and 24h change:

curl -X POST https://api.hiveintelligence.xyz/api/execute \
  -H "Content-Type: application/json" \
  -d '{
    "toolName": "get_price",
    "arguments": {
      "ids": "bitcoin",
      "vs_currencies": "usd",
      "include_market_cap": true,
      "include_24hr_change": true,
      "include_24hr_vol": true
    }
  }'

Response:

{
  "bitcoin": {
    "usd": 67234.12,
    "usd_market_cap": 1324567890123,
    "usd_24h_vol": 28456789012,
    "usd_24h_change": 2.45
  }
}

Python Example

import requests

def get_crypto_price(coins, currencies="usd", include_change=False):
    response = requests.post(
        "https://api.hiveintelligence.xyz/api/execute",
        json={
            "toolName": "get_price",
            "arguments": {
                "ids": coins,
                "vs_currencies": currencies,
                "include_24hr_change": include_change
            }
        }
    )
    return response.json()

# Get top 5 crypto prices
prices = get_crypto_price("bitcoin,ethereum,solana,cardano,polkadot", include_change=True)
for coin, data in prices.items():
    print(f"{coin}: ${data['usd']:,.2f} ({data.get('usd_24h_change', 0):+.2f}%)")

JavaScript Example

async function getCryptoPrice(coins, options = {}) {
  const response = await fetch('https://api.hiveintelligence.xyz/api/execute', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      toolName: 'get_price',
      arguments: {
        ids: coins,
        vs_currencies: options.currencies || 'usd',
        include_24hr_change: options.includeChange || false,
        include_market_cap: options.includeMarketCap || false
      }
    })
  });
  return response.json();
}

// Usage
const prices = await getCryptoPrice('bitcoin,ethereum', { includeChange: true });
console.log(`BTC: $${prices.bitcoin.usd.toLocaleString()}`);

MCP Integration

{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "get_price",
    "arguments": {
      "ids": "bitcoin,ethereum,solana",
      "vs_currencies": "usd,eur",
      "include_24hr_change": true
    }
  },
  "id": 1
}

Common Coin IDs

CryptocurrencyCoin ID
Bitcoinbitcoin
Ethereumethereum
Solanasolana
Cardanocardano
Polkadotpolkadot
Avalancheavalanche-2
Polygonmatic-network
Chainlinkchainlink
Uniswapuniswap
Arbitrumarbitrum

Use search_all to find coin IDs for any cryptocurrency.


Use Cases

  1. Portfolio Trackers: Display real-time portfolio values
  2. Trading Bots: Monitor prices for automated trading signals
  3. Price Alerts: Trigger notifications on price movements
  4. Analytics Dashboards: Show live market data
  5. E-commerce: Accept crypto payments with live conversion rates

Rate Limits

TierRequests/Minute
Free30
Pro100
EnterpriseUnlimited


FAQ

Q: How often is price data updated? A: Prices are updated every 60 seconds from CoinGecko's aggregated feeds.

Q: What's the difference between get_price and get_coins_market_data? A: get_price is optimized for simple price queries with minimal data. get_coins_market_data returns comprehensive market data with pagination support.

Q: How do I find the coin ID for a specific cryptocurrency? A: Use the search_all tool to search by name, symbol, or contract address.