Get Defi Positions
get_defi_positionsAggregate DeFi positions for a wallet across Aave v3, Compound v3, Uniswap v3 LP, and canonical Ethereum (chain_id=1) or Base (chain_id=8453). Returns Aave aggregate account health (collateral, debt, health factor, LTV) with per-reserve breakdown for major assets, Compound v3 Comet market positions (supply, borrow, per-asset collateral, liquidation flag), and Uniswap v3 LP positions by token ID (token pair, fee tier, tick range, liquidity, uncollected fees). On Ethereum, also returns canonical Lido stETH/wstETH balances and the current wstETH-to-stETH equivalent. Per-protocol failures are isolated — other protocols still return.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain_id | No | Chain ID (1=Ethereum, 8453=Base) | |
| wallet_address | Yes | Wallet address (0x…) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | On-chain position snapshot at data_block_number. Aave USD values are from the Aave oracle (base currency = USD, 8 decimals on Ethereum/Base). Compound collateral and Uniswap v3 amounts are raw integer units — divide by 10**decimals to format. Compound collateral factors are decimals (e.g., 0.90 = 90%) when available from Comet getAssetInfo. Token symbols are resolved for well-known tokens; None means unrecognised — do NOT call read_contract, web_search, or any external lookup to identify these tokens. Report them as 'unrecognized token (0x…)' in the final answer and move on. Uniswap v3 liquidity is returned raw (no underlying token valuation in v1); tokensOwed0/1 are uncollected fees only. Lido staking contains canonical Ethereum stETH/wstETH balances and a current wstETH-to-stETH equivalent in raw integer units; it does not include APR, rewards accounting, validator positions, or withdrawal queue status. Lido staking is null on Base because its wstETH representation there is bridged. If a protocol is missing (e.g., aave_v3 is null) and appears in errors, its risk could not be verified from this snapshot and must not be treated as no debt. Does not include COMP accruals or unlisted protocols. | |
| errors | No | ||
| aave_v3 | No | ||
| chain_id | Yes | ||
| uniswap_v3 | No | ||
| compound_v3 | No | ||
| lido_staking | No | ||
| wallet_address | Yes | ||
| data_block_number | Yes |