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
| Parameter | Type | Required | Description |
|---|---|---|---|
| ids | string | Yes | Comma-separated coin IDs (e.g., "bitcoin,ethereum,solana") |
| vs_currencies | string | Yes | Target currencies (e.g., "usd,eur,btc") |
| include_market_cap | boolean | No | Include market capitalization (default: false) |
| include_24hr_vol | boolean | No | Include 24-hour trading volume (default: false) |
| include_24hr_change | boolean | No | Include 24-hour price change percentage (default: false) |
| include_last_updated_at | boolean | No | Include 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
| Cryptocurrency | Coin ID |
|---|---|
| Bitcoin | bitcoin |
| Ethereum | ethereum |
| Solana | solana |
| Cardano | cardano |
| Polkadot | polkadot |
| Avalanche | avalanche-2 |
| Polygon | matic-network |
| Chainlink | chainlink |
| Uniswap | uniswap |
| Arbitrum | arbitrum |
Use search_all to find coin IDs for any cryptocurrency.
Use Cases
- Portfolio Trackers: Display real-time portfolio values
- Trading Bots: Monitor prices for automated trading signals
- Price Alerts: Trigger notifications on price movements
- Analytics Dashboards: Show live market data
- E-commerce: Accept crypto payments with live conversion rates
Rate Limits
| Tier | Requests/Minute |
|---|---|
| Free | 30 |
| Pro | 100 |
| Enterprise | Unlimited |
Related Tools
- get_coins_market_data - Detailed market data with pagination
- get_coin_history - Historical price data
- get_token_price_by_contract - Price by contract address
- get_gainers_losers - Top gainers and losers
- search_all - Find coin IDs for any cryptocurrency
- get_trending - Discover trending cryptocurrencies
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.