get_returns
Query historical DeFi lending returns from the ProfitLens engine.
Returns real, empirically measured after-fee returns — not theoretical
APY projections. Data is computed from on-chain index ratios every 30 min.
Args:
api_key: Your PreFlyte API key (required).
chain: Filter by chain — "ethereum" or "arbitrum". Empty = all chains.
protocol: Filter by protocol — "aave-v3" or "compound-v3". Empty = all.
asset: Filter by asset symbol — "USDC", "WETH", etc. Empty = all.
strategy: Filter by strategy — "supply" or "borrow". Empty = both.
window_days: Return window — 7, 14, 30, or 90 days. Default 7.
limit: Max results to return. Default 20, max 50.
Returns:
Dictionary with 'results' array and metadata. Each result includes:
gross_apy_pct, net_apy_pct, gas_cost_pct, data_completeness_pct,
chain, protocol, asset, strategy, and more.
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": {
"api_key": "<api_key>"
},
"name": "get_returns"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asset | No | ||
| chain | No | ||
| limit | No | ||
| api_key | Yes | ||
| protocol | No | ||
| strategy | No | ||
| window_days | No |