Paid API · $0.03 per call
DeFi position risk
Give the venue, the wallet and the action you are considering, and get the health factor now, the health factor after the action, and the cushion to liquidation in both cases. It is the number that decides whether the position survives a normal drawdown.
Question it answers: How close is this lending position to liquidation?
What you send
| Parameter | Example | Meaning |
|---|---|---|
venue | aave-v3 | aave-v3 or morpho-blue |
wallet | 0xf0e942545bf0826bc30b496bcfa956b88586fcc6 | position owner |
action | borrow | borrow or withdraw (optional) |
amount | 100 | amount in the venue unit (optional) |
What you get
- Health factor now, and after the proposed action.
- The liquidation price and the cushion to it.
- Both venues behind one shape, so the caller does not learn two APIs.
When not to buy it
- It reads the position at one block; interest accrual and oracle moves change it.
- It does not model bank runs, bad debt or a frozen market.
- The risk engine depends on the venue RPC answering; a failure is reported as 502, not a guess.
How to call it
The route answers 402 with the price, the asset and the receiving address; pay with any x402 client on Base and repeat the call.
GET https://app.gtxagent.com/x402/position-risk
# 402 → pay 0.03 USDC on Base (eip155:8453)
# retry with the X-PAYMENT header
The manifest is authoritative: /.well-known/x402. The full price list is /pricing.md.
Questions
Which venues are supported?
Aave V3 and Morpho Blue on Base today. The venue is a parameter, not a separate route.
Does it move funds?
No. It is a read-only calculation; execution stays in the user wallet.