Skip to main content
Glama
0xReisearch

REI Crypto MCP Server

by 0xReisearch

get_price_chart

Retrieve token price data at specified intervals for custom time ranges with chain and address parameters. Analyze historical trends and market movements using this API tool.

Instructions

GET /coins/chart/{coins}

Get token prices at regular time intervals. Parameters: coins: comma-separated tokens in format {chain}:{address} start: unix timestamp of earliest data point end: unix timestamp of latest data point span: number of data points returned period: duration between data points (default: '24h') search_width: time range on either side to find price data (default: '600')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coinsYes
endNo
periodNo24h
search_widthNo600
spanNo
startNo

Implementation Reference

  • Handler function decorated with @mcp.tool() that implements the get_price_chart tool. It constructs parameters and calls the DefiLlama API endpoint /coins/chart/{coins} via the make_request helper to retrieve token price charts at regular intervals.
    @mcp.tool() async def get_price_chart( coins: str, start: Optional[int] = None, end: Optional[int] = None, span: Optional[int] = None, period: str = "24h", search_width: str = "600" ) -> str: """GET /coins/chart/{coins} Get token prices at regular time intervals. Parameters: coins: comma-separated tokens in format {chain}:{address} start: unix timestamp of earliest data point end: unix timestamp of latest data point span: number of data points returned period: duration between data points (default: '24h') search_width: time range on either side to find price data (default: '600') """ params = { 'period': period, 'searchWidth': search_width } if start is not None: params['start'] = start if end is not None: params['end'] = end if span is not None: params['span'] = span result = await make_request('GET', f'/coins/chart/{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