Skip to main content
Glama
0xReisearch

REI Crypto MCP Server

by 0xReisearch

get_protocol_inflows

Retrieve inflow and outflow data for a specific DeFi protocol at a given timestamp to analyze capital movements and protocol activity.

Instructions

GET /api/inflows/{protocol}/{timestamp}

Lists the amount of inflows and outflows for a protocol at a given date. Parameters: protocol: protocol slug (e.g., 'compound-v3') timestamp: unix timestamp (e.g., 1700006400)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
protocolYes
timestampYes

Implementation Reference

  • The main handler function for the get_protocol_inflows MCP tool. It is registered via the @mcp.tool() decorator and implements the logic to fetch inflows/outflows data for a protocol at a specific timestamp from the DefiLlama API, returning the result as a string. The function signature and docstring define the input schema.
    async def get_protocol_inflows(protocol: str, timestamp: int) -> str: """GET /api/inflows/{protocol}/{timestamp} Lists the amount of inflows and outflows for a protocol at a given date. Parameters: protocol: protocol slug (e.g., 'compound-v3') timestamp: unix timestamp (e.g., 1700006400) """ result = await make_request('GET', f'/api/inflows/{protocol}/{timestamp}') 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