{"uid":"cap_btNhkYM7x2sfAvLb9OgFP","slug":"defi-oracle-liquidation-risk-analyzer-fa56ebbb","name":"DeFi Oracle — Liquidation Risk Analyzer","description":"DeFi data for AI agents — yield rates, swap routes, IL calculator, liquidation risk, MEV scanner, TVL tracking. Powered by DeFiLlama + on-chain RPC data. Pay with USDC on Base via x402.","url":"https://defi-oracle-two.vercel.app/api/liquidation-risk","method":"POST","headers":{},"bodySchema":{"type":"object","required":["borrow_token","collateral_token"],"properties":{"borrow_token":{"type":"string"},"collateral_token":{"type":"string"},"borrow_amount_usd":{"type":"number"},"collateral_value_usd":{"type":"number"},"liquidation_threshold":{"type":"number"}}},"responseSchema":{"type":"object","properties":{"chain":{"type":"string"},"borrow":{"type":"string"},"position":{"type":"object"},"collateral":{"type":"string"},"risk_level":{"type":"string"},"liquidation":{"type":"object"},"recommendations":{"type":"array","items":{"type":"string"}}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.15","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.15/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.15","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.15","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Odvmi4ZnYu5bGPBNFn_Ak","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.15","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates liquidation risk for DeFi lending positions given collateral and borrow token details, returning risk level, liquidation thresholds, and actionable recommendations.","exampleAgentPrompt":"Check my liquidation risk: I'm borrowing $5,000 USDC against $8,000 worth of ETH as collateral, with a liquidation threshold of 0.8 — am I in danger of getting liquidated and what should I do?","exampleUseCases":null,"resultDescription":"Returns a structured object containing the chain, borrow token, collateral token, computed position metrics, a risk_level string (e.g. low/medium/high), detailed liquidation parameters (price triggers, health factor), and an array of human-readable recommendations for managing or reducing liquidation risk.","failureModes":["Missing required fields (borrow_token or collateral_token) returns a validation error","Unknown or unsupported token symbols may result in no price data and an error","Extreme or unrealistic USD values may produce inaccurate risk calculations","Downstream RPC or DeFiLlama API unavailability causes 5xx errors","Payment failure via x402/USDC on Base blocks the request before processing"],"whenToPreferThis":"Use this endpoint when an AI agent needs to evaluate whether a DeFi lending position is at risk of forced liquidation, especially when you have specific borrow and collateral token pairs and USD values. It is purpose-built for liquidation risk analysis (not general yield or swap routing), returning a risk level and actionable recommendations — prefer it over generic on-chain data fetchers when the goal is position health monitoring.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:51:16.311Z","isFirstParty":false}