Skip to main content
Glama
0xReisearch

REI Crypto MCP Server

by 0xReisearch

get_batch_historical_prices

Retrieve historical price data for multiple cryptocurrencies at specific timestamps using batch queries. This tool helps analyze token price movements across different time periods for research and trading decisions.

Instructions

GET /coins/batchHistorical

Get historical prices for multiple tokens at multiple different timestamps. Parameters: coins: dict where keys are coins in format {chain}:{address} and values are arrays of timestamps search_width: time range on either side to find price data (default: '6h')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coinsYes
search_widthNo6h

Implementation Reference

  • The handler function for the 'get_batch_historical_prices' MCP tool. It is registered using the @mcp.tool() decorator and implements the logic to fetch batch historical prices from the DefiLlama API endpoint '/coins/batchHistorical' using the shared make_request helper.
    @mcp.tool() async def get_batch_historical_prices( coins: Dict[str, List[int]], search_width: str = "6h" ) -> str: """GET /coins/batchHistorical Get historical prices for multiple tokens at multiple different timestamps. Parameters: coins: dict where keys are coins in format {chain}:{address} and values are arrays of timestamps search_width: time range on either side to find price data (default: '6h') """ params = { 'coins': str(coins), 'searchWidth': search_width } result = await make_request('GET', '/coins/batchHistorical', 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