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)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"pool": "<pool>"
},
"name": "get_yield_chart_lend_borrow"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pool | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | 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)