Skip to main content
Glama
0xReisearch

REI Crypto MCP Server

by 0xReisearch

get_price_chart

Retrieve historical price data for crypto tokens at specified intervals to analyze market trends and performance over time.

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
startNo
endNo
spanNo
periodNo24h
search_widthNo600

Implementation Reference

  • The handler function for the 'get_price_chart' tool, registered via @mcp.tool(). It constructs parameters and calls the DefiLlama API endpoint /coins/chart/{coins} 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