Skip to main content
Glama
0xReisearch

REI Crypto MCP Server

by 0xReisearch

get_dex_overview_by_chain

Retrieve a comprehensive overview of decentralized exchanges (DEXs) on a specific blockchain, including volume summaries and historical data, tailored for chain-specific analysis.

Instructions

GET /api/overview/dexs/{chain}

List all dexs along with summaries of their volumes and dataType history data filtering by chain. Parameters: chain: chain name (e.g., 'ethereum') exclude_total_data_chart: true to exclude aggregated chart from response exclude_total_data_chart_breakdown: true to exclude broken down chart from response

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainYes
exclude_total_data_chartNo
exclude_total_data_chart_breakdownNo

Implementation Reference

  • The handler function for the 'get_dex_overview_by_chain' tool. It is registered via @mcp.tool() decorator and implements the core logic by preparing parameters and calling the DefiLlama API endpoint '/api/overview/dexs/{chain}' via the make_request helper.
    @mcp.tool() async def get_dex_overview_by_chain( chain: str, exclude_total_data_chart: bool = True, exclude_total_data_chart_breakdown: bool = True ) -> str: """GET /api/overview/dexs/{chain} List all dexs along with summaries of their volumes and dataType history data filtering by chain. Parameters: chain: chain name (e.g., 'ethereum') exclude_total_data_chart: true to exclude aggregated chart from response exclude_total_data_chart_breakdown: true to exclude broken down chart from response """ params = { 'excludeTotalDataChart': str(exclude_total_data_chart).lower(), 'excludeTotalDataChartBreakdown': str(exclude_total_data_chart_breakdown).lower() } result = await make_request('GET', f'/api/overview/dexs/{chain}', params) return str(result)
  • Helper function used by the tool handler (and others) to perform HTTP requests to the DefiLlama Pro API using the configured httpx.AsyncClient.
    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)}"

Other Tools

Related Tools

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