Skip to main content
Glama
0xReisearch

REI Crypto MCP Server

by 0xReisearch

get_historical_prices

Retrieve historical cryptocurrency token prices by contract address and timestamp for analysis and tracking.

Instructions

GET /coins/prices/historical/{timestamp}/{coins}

Get historical prices of tokens by contract address. Parameters: timestamp: UNIX timestamp for historical prices coins: comma-separated tokens in format {chain}:{address} search_width: time range on either side to find price data (default: '6h')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timestampYes
coinsYes
search_widthNo6h

Implementation Reference

  • The handler function decorated with @mcp.tool() that implements the get_historical_prices tool. It fetches historical token prices from the DefiLlama API using the provided timestamp, coins, and search width.
    @mcp.tool() async def get_historical_prices( timestamp: int, coins: str, search_width: str = "6h" ) -> str: """GET /coins/prices/historical/{timestamp}/{coins} Get historical prices of tokens by contract address. Parameters: timestamp: UNIX timestamp for historical prices coins: comma-separated tokens in format {chain}:{address} 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/historical/{timestamp}/{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