get_yield_chart_lend_borrow
Retrieve historical borrow cost APY data from lending market pools to analyze borrowing trends and costs over time.
Instructions
GET /yields/chartLendBorrow/{pool}
Historical borrow cost APY from a pool on a lending market.
Parameters:
pool: pool id (can be retrieved from /poolsBorrow)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pool | Yes |
Implementation Reference
- defillama_server.py:362-372 (handler)The main handler function for the 'get_yield_chart_lend_borrow' tool. It is registered via the @mcp.tool() decorator and fetches historical borrow cost APY data from the DefiLlama API for a given pool ID, returning the JSON response as a string.@mcp.tool() async def get_yield_chart_lend_borrow(pool: str) -> str: """GET /yields/chartLendBorrow/{pool} Historical borrow cost APY from a pool on a lending market. Parameters: pool: pool id (can be retrieved from /poolsBorrow) """ result = await make_request('GET', f'/yields/chartLendBorrow/{pool}') return str(result)