> ## Documentation Index
> Fetch the complete documentation index at: https://docs.b3os.org/llms.txt
> Use this file to discover all available pages before exploring further.

# DeFi Lookup

Discover DeFi positions, claimable rewards, and protocol interactions for any EVM wallet via DeBank Pro API. Returns lending/borrowing, staking, LP positions with contract addresses, health factors, and reward amounts. Supports 1000+ protocols (Morpho, Aave, Compound, Uniswap, Curve) across all major EVM chains. Ideal for: finding claimable rewards, monitoring position health, protocol discovery, DeFi portfolio analysis.

![DeFi Lookup logo](https://ai-icon.b3.fun/logo/debank)
Catalog action Blockchain Data

Discover DeFi positions, claimable rewards, and protocol interactions for any EVM wallet via DeBank Pro API. Returns lending/borrowing, staking, LP positions with contract addresses, health factors, and reward amounts. Supports 1000+ protocols (Morpho, Aave, Compound, Uniswap, Curve) across all major EVM chains. Ideal for: finding claimable rewards, monitoring position health, protocol discovery, DeFi portfolio analysis.


## At a Glance

| Field | Value |
| --- | --- |
| Action ID | `debank-defi-lookup` |
| Category | Blockchain Data |
| Connector | Not required |
| Requires gas | No |
| Funds movement | None declared |
| Tags | `debank`, `defi`, `positions`, `rewards`, `lending`, `borrowing`, `staking`, `liquidity`, `protocol`, `portfolio`, `morpho`, `aave` |

## Payload Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `address` | `string` | Yes | The EVM wallet address to query DeFi positions for. Must be a valid 42-character hex address starting with 0x. |
| `chainId` | `number` | No | Chain ID to query. When omitted, returns positions across all chains \(30 API units\). When specified, queries a single chain \(10 units\). Common values: 1 \(Ethereum\), 8453 \(Base\), 42161 \(Arbitrum\), 10 \(Optimism\), 137 \(Polygon\). |
| `queryType` | `string` | No | Type of query: 'all' returns positions, rewards and history \(15 API units\). 'positions' returns only DeFi positions \(10 units\). 'rewards' returns only claimable rewards \(10 units\). 'history' returns recent protocol interactions \(5 units\). Default: 'all' |
| `protocol` | `string` | No | Optional: Filter by specific protocol \(e.g., 'morpho', 'aave', 'uniswap'\). When specified, uses cheapest API endpoint \(4 units\). Protocol names are normalized automatically. |

## Result Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `queryType` | `string` | Yes | The type of query that was executed |
| `positions` | `array` | No | Array of DeFi positions. Each includes: protocol, protocolLogo, chainId, positionType \(lending/borrowing/staking/liquidity/farming/other\), contractAddress, tokenAddress, asset symbol, balance amount, and valueUsd. |
| `rewards` | `array` | No | Array of claimable rewards. Each includes: protocol, chainId, rewardToken symbol, rewardTokenAddress, amount, valueUsd, claimContract \(address to call for claiming\), and sourceContract \(the vault generating rewards\). |
| `history` | `array` | No | Array of recent protocol interactions. Each includes: protocol name, chainId, action type, txHash, timestamp \(ISO string\), and contractAddress. |
| `summary` | `object` | No | Aggregate statistics including: totalPositionsUsd, totalRewardsUsd, protocolCount, positionCount. |

## Examples

**Workflow node**

```json
{
  "type": "debank-defi-lookup",
  "payload": {
    "address": "0x0000000000000000000000000000000000000000"
  },
  "children": []
}
```
  **Test with API**

```bash
curl -X POST "https://api.b3os.org/v1/actions/debank-defi-lookup/test" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "inputs": {
    "address": "0x0000000000000000000000000000000000000000"
  }
}'
```

**Use expressions for dynamic values**

Payload fields can use workflow expressions such as `{{$trigger.body.amount}}`, `{{$nodes.fetch.result.price}}`, and `{{$props.asset}}` when the value should come from a trigger, prior node, or reusable workflow prop.