Skip to main content
Glama
0xReisearch

REI Crypto MCP Server

by 0xReisearch

get_first_price_record

Retrieve the earliest timestamp price record for specific crypto tokens by providing their chain and address details. Ideal for tracking initial price data points.

Instructions

GET /coins/prices/first/{coins}

Get earliest timestamp price record for coins. Parameters: coins: comma-separated tokens in format {chain}:{address}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coinsYes

Implementation Reference

  • The main handler function for the 'get_first_price_record' tool. It is decorated with @mcp.tool() which registers it automatically with FastMCP. The function makes an API request to DefiLlama's /coins/prices/first/{coins} endpoint using the shared make_request helper and returns the result as a string. Input schema is defined by the 'coins: str' type hint and docstring.
    @mcp.tool() async def get_first_price_record(coins: str) -> str: """GET /coins/prices/first/{coins} Get earliest timestamp price record for coins. Parameters: coins: comma-separated tokens in format {chain}:{address} """ result = await make_request('GET', f'/coins/prices/first/{coins}') return str(result)
  • Shared helper function used by all tools, including get_first_price_record, to make HTTP requests to the DefiLlama API.
    async def make_request(method: str, endpoint: str, params: Optional[Dict[str, Any]] = None) -> Any: """Make a request to the DefiLlama API.""" try: response = await client.request(method, endpoint, params=params) response.raise_for_status() return response.json() except Exception as e: return f"Error: {str(e)}"
  • The @mcp.tool() decorator registers the get_first_price_record function as an MCP tool with the server instance 'mcp'.
    @mcp.tool()

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