Skip to main content
Glama
0xReisearch

REI Crypto MCP Server

by 0xReisearch

get_current_prices

Retrieve the current prices of crypto tokens by contract address using chain-specific and Coingecko identifiers. Specify a time range to ensure accurate and up-to-date price data.

Instructions

GET /coins/prices/current/{coins}

Get current prices of tokens by contract address. Parameters: coins: comma-separated tokens in format {chain}:{address} (e.g., 'ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1,coingecko:ethereum') search_width: time range on either side to find price data (default: '6h')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coinsYes
search_widthNo6h

Implementation Reference

  • The main handler implementation for the 'get_current_prices' MCP tool. It is registered via the @mcp.tool() decorator and handles fetching current token prices from the DefiLlama API by making an HTTP request to the /coins/prices/current endpoint. Includes input schema via type hints and docstring.
    @mcp.tool() async def get_current_prices( coins: str, search_width: str = "6h" ) -> str: """GET /coins/prices/current/{coins} Get current prices of tokens by contract address. Parameters: coins: comma-separated tokens in format {chain}:{address} (e.g., 'ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1,coingecko:ethereum') search_width: time range on either side to find price data (default: '6h') """ params = {'searchWidth': search_width} result = await make_request('GET', f'/coins/prices/current/{coins}', params) return str(result)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/0xReisearch/crypto-mcp-beta'

If you have feedback or need assistance with the MCP directory API, please join our Discord server