Use when an agent must check if a wallet's loans are near liquidation
1gateway.dev/v1/defi/health
Use when an agent must check if a wallet's loans are near liquidation. Input: address, optional chain (base, ethereum, arbitrum, all). Output: JSON per chain Aave v3 collateral, debt, borrowing power, LTV, health factor and liquidation distance %; Compound v3 supplied/borrowed base asset and isLiquidatable; summary with the lowest health factor. Read from contracts. Example: ?address=0x6246eee0355
GET
https://1gateway.dev/v1/defi/healthUptime100% of 5 checks in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
// npm install fourohtwo
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://1gateway.dev/v1/defi/health?address=0x6246eee0355Dd7A93C888fE59e1151388A0cC5a1&chain=all");
console.log(await res.json());Example input
{
"address": "0x6246eee0355Dd7A93C888fE59e1151388A0cC5a1",
"chain": "all"
}