GnistAI GnistAI
Log in

Getting Started with Crypto Prices

Bitcoin, Ethereum, and altcoin prices — market cap, volume, and 24h changes.

All Tutorials   |   Overview   |   Playground   |   MCP   |   REST API   |   Home
Finance

Data source: CoinGecko

Overview

Crypto Prices wraps CoinGecko, handling authentication, pagination, and rate limits for you. This tutorial covers all 5 tools with working code examples you can copy and run.

Prerequisites

  1. Sign up at https://context.gnist.ai/signup for a free API key (100 calls/day).
  2. Choose your integration method: MCP protocol or REST API.

Connect via MCP

Add to your MCP client config (Claude Desktop, Cursor, etc.):

MCP Config
{
  "mcpServers": {
    "gnist-crypto-prices": {
      "url": "https://context.gnist.ai/mcp/crypto-prices/",
      "headers": {
        "Gnist-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Tools (5)

get_crypto_price

Get the current price and market data for a cryptocurrency. Returns price in USD, market cap, 24h change, and trading volume. Args: coin_id: CoinGecko coin ID (e.g. "bitcoin", "ethereum", "solana"). Use search_crypto to find the correct ID.

ParameterTypeRequiredDescription
coin_idstringrequired
curl -X POST "https://context.gnist.ai/mcp/crypto-prices/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_crypto_price", "arguments": {"coin_id": "12345"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/crypto-prices/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'coin_id': '12345'}, 'name': 'get_crypto_price'}},
)
print(resp.json())

get_top_cryptocurrencies

Get the top cryptocurrencies ranked by market capitalization. Returns price, market cap, 24h change, and volume for each coin. Args: limit: Number of coins to return (1-100, default 10).

ParameterTypeRequiredDescription
limitintegeroptional (default: 10)
curl -X POST "https://context.gnist.ai/mcp/crypto-prices/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_top_cryptocurrencies", "arguments": {"limit": 10}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/crypto-prices/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'limit': 10}, 'name': 'get_top_cryptocurrencies'}},
)
print(resp.json())

get_crypto_simple_price

Get prices for multiple cryptocurrencies in multiple fiat currencies. Lightweight endpoint for quick price lookups. Args: coin_ids: Comma-separated CoinGecko IDs (e.g. "bitcoin,ethereum,solana"). vs_currencies: Comma-separated currency codes (e.g. "usd,eur,nok"). Default: "usd".

ParameterTypeRequiredDescription
coin_idsstringrequired
vs_currenciesstringoptional (default: usd)
curl -X POST "https://context.gnist.ai/mcp/crypto-prices/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_crypto_simple_price", "arguments": {"coin_ids": "12345"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/crypto-prices/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'coin_ids': '12345'},
            'name': 'get_crypto_simple_price'}},
)
print(resp.json())

search_crypto

Search for a cryptocurrency by name or symbol. Returns matching coins with their CoinGecko IDs for use with other tools. Args: query: Search term (e.g. "bitcoin", "ETH", "solana").

ParameterTypeRequiredDescription
querystringrequired
curl -X POST "https://context.gnist.ai/mcp/crypto-prices/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "search_crypto", "arguments": {"query": "renewable energy"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/crypto-prices/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'query': 'renewable energy'},
            'name': 'search_crypto'}},
)
print(resp.json())

report_feedback

Report a bug, feature request, or general feedback for this data source. Use this when something doesn't work as expected, when you'd like a new feature, or when you have suggestions for improvement. Args: feedback: Describe the issue or suggestion. feedback_type: One of 'bug', 'feature_request', or 'general'.

ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: general)
curl -X POST "https://context.gnist.ai/mcp/crypto-prices/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "report_feedback", "arguments": {"feedback": "example"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/crypto-prices/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'feedback': 'example'}, 'name': 'report_feedback'}},
)
print(resp.json())

Common Patterns

Search then retrieve
Use search_crypto to find items, then get_crypto_price to get full details. This two-step pattern is common for exploring data before drilling down.
Pagination
Several tools support limit, offset, or page parameters. Start with small limits during development, then increase for production queries.

FAQ

What data does Crypto Prices provide?

Bitcoin, Ethereum, and altcoin prices — market cap, volume, and 24h changes. It exposes 5 tools: get_crypto_price, get_top_cryptocurrencies, get_crypto_simple_price, search_crypto, report_feedback.

What do I need to get started?

A Gnist API key (free tier: 100 calls/day). Sign up at https://context.gnist.ai/signup.

What format does the Crypto Prices API return?

JSON, via either MCP protocol (JSON-RPC 2.0) or REST API.

Next Steps

Related Tutorials