quant-defi
GET api.agentstools.dev/quant/defi
Why an agent can trust this route.
Sonar evidence is advisory. Paid delivery is shown as verified only when paid probes are available; otherwise route estimates use the unpaid handshake as a clearly labeled proxy.
Observed outcomes
DeFi math helper: APR and APY conversion, funding annualization, impermanent loss, liquidation price, and leverage. Pure computation over your inputs.
Resource: api.agentstools.dev/quant/defi
Network: eip155:8453 · Asset: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 · Pay to: 0xF22e558a00D91Ee12A1F50C52186FecB8dDFf493
Payment methods: — · Last validation: 2026-10-15 11:28:41.033+00
{
"input": {
"type": "object",
"required": [
"type",
"method"
],
"properties": {
"type": {
"type": "string",
"const": "http"
},
"method": {
"enum": [
"GET",
"HEAD",
"DELETE"
],
"type": "string"
},
"queryParams": {
"type": "object",
"required": [
"op"
],
"properties": {
"n": {
"type": "number",
"description": "Compounding periods per year for the rate conversions"
},
"op": {
"enum": [
"apr_to_apy",
"apy_to_apr",
"funding_annualized",
"impermanent_loss",
"liquidation_price",
"leverage",
"lp_value"
],
"type": "string",
"description": "Which DeFi formula to evaluate"
},
"apr": {
"type": "number",
"description": "APR as a decimal for op=apr_to_apy"
},
"apy": {
"type": "number",
"description": "APY as a decimal for op=apy_to_apr"
},
"rate": {
"type": "number",
"description": "Per-period funding rate for op=funding_annualized"
},
"side": {
"enum": [
"long",
"short"
],
"type": "string",
"description": "Position side for op=liquidation_price"
},
"equity": {
"type": "number",
"description": "Equity for op=leverage"
},
"leverage": {
"type": "number",
"description": "Leverage for op=liquidation_price and op=leverage"
},
"notional": {
"type": "number",
"description": "Notional for op=leverage"
},
"entry_price": {
"type": "number",
"description": "Entry price for op=liquidation_price"
},
"price_ratio": {
"type": "number",
"description": "Price ratio k for impermanent loss and LP value"
},
"initial_value": {
"type": "number",
"description": "Optional initial value for op=lp_value"
},
"periods_per_year": {
"type": "number",
"description": "Funding periods per year, default 1095"
},
"maintenance_margin": {
"type": "number",
"description": "Maintenance margin as a decimal, default 0.005"
}
}
}
},
"additionalProperties": false
},
"output": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string"
},
"example": {
"type": "object"
}
}
},
"paymentRequirements": [
{
"raw": {
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"extra": {
"name": "USD Coin",
"version": "2"
},
"payTo": "0xF22e558a00D91Ee12A1F50C52186FecB8dDFf493",
"amount": "2000",
"scheme": "exact",
"network": "eip155:8453",
"maxTimeoutSeconds": 300
},
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"payTo": "0xF22e558a00D91Ee12A1F50C52186FecB8dDFf493",
"scheme": "exact",
"network": "eip155:8453",
"amountAtomic": "2000"
}
]
}Source catalog records are retained separately from live endpoint observations. Sonar score, uptime, and latency are advisory metrics. CDP indexing is not inferred from validation.