DeBank DeFi Portfolio Aggregator
K.I.T. Skill for comprehensive DeFi portfolio tracking via DeBank
Overview
DeBank is the leading DeFi portfolio tracker, supporting 1,300+ protocols across all major EVM chains. This skill integrates DeBank's data to provide:
- Multi-chain portfolio aggregation
- Real-time position tracking (LP, lending, staking, vesting)
- Protocol health monitoring
- Whale wallet tracking
- Transaction history analysis
- NFT holdings
Features
Portfolio Tracking
- Multi-Chain Support: Ethereum, BSC, Polygon, Arbitrum, Optimism, Avalanche, Fantom, Base, zkSync, and 50+ more chains
- Protocol Coverage: Uniswap, Aave, Compound, Curve, Convex, Lido, Yearn, GMX, and 1,300+ protocols
- Position Types: Tokens, LP positions, lending, borrowing, staking, farming, vesting, NFTs
Wallet Intelligence
- Whale Tracking: Monitor high-value wallets and their movements
- Social Features: Follow wallets, see what "smart money" is doing
- Transaction Analysis: Detailed tx history with protocol interactions
Risk Monitoring
- Protocol Health: Track TVL changes, audits, risks
- Position Health: Monitor liquidation risks, IL exposure
- Chain Exposure: Understand cross-chain risk distribution
Usage
Quick Commands
import { DeBank } from '@kit/skills/debank-aggregator';
// Get full portfolio for an address
const portfolio = await DeBank.getPortfolio('0x...');
// Get positions in a specific protocol
const aavePositions = await DeBank.getProtocolPositions('0x...', 'aave');
// Track whale wallets
const whales = await DeBank.getWhaleActivity({ minValue: 1_000_000 });
// Get token balances across all chains
const balances = await DeBank.getTokenBalances('0x...');
// NFT holdings
const nfts = await DeBank.getNFTHoldings('0x...');
K.I.T. Agent Integration
User: "What's the total value of my DeFi positions?"
K.I.T.: Uses debank-aggregator to fetch all positions:
- Lido stETH: $45,230
- Aave USDC lending: $12,500
- Uniswap V3 ETH/USDC LP: $8,340
- Convex CRV staking: $3,200
Total DeFi Value: $69,270
API Reference
DeBank Open API
DeBank provides a comprehensive API (some endpoints require API key):
Free Endpoints:
/v1/user/total_balance - Total balance across chains
/v1/user/chain_balance - Balance per chain
/v1/user/token_list - Token holdings
/v1/user/complex_protocol_list - Protocol positions
Pro Endpoints (API Key Required):
/v1/user/history_list - Transaction history
/v1/user/nft_list - NFT holdings
/v1/protocol/list - All supported protocols
/v1/whale/list - Whale wallet data
Rate Limits
- Free: 10 requests/second
- Pro: 100 requests/second
Configuration
{
"debank": {
"apiKey": "YOUR_DEBANK_API_KEY", // Optional, for pro features
"watchlist": [
"0x...", // Your wallets
"0x..." // Whale wallets to track
],
"alerts": {
"portfolioChange": 10, // Alert on 10% change
"protocolRisk": true, // Alert on protocol issues
"whaleMovement": 100000 // Alert on $100k+ whale moves
}
}
}
K.I.T. Advantages over DeBank UI
- Automation: Auto-rebalance when positions drift
- Alerts: Custom alerts via Telegram, Discord, etc.
- Cross-Platform: Combine DeFi data with CEX, forex, stocks
- AI Analysis: K.I.T. analyzes positions and suggests optimizations
- Tax Integration: Feed data to tax-tracker skill
- Copy Trading: Copy whale strategies automatically
Example Workflows
Daily Portfolio Check
1. Fetch all positions via DeBank
2. Calculate daily P&L
3. Check liquidation risks
4. Send summary to user
Whale Copy Trading
1. Monitor whale watchlist
2. Detect new positions
3. Analyze opportunity
4. Execute similar position (scaled)
5. Set stop-loss/take-profit
Yield Optimization
1. Scan all yield positions
2. Compare with current rates
3. Identify better opportunities
4. Suggest/execute migration
Files
debank-client.ts - API client implementation
portfolio-tracker.ts - Portfolio aggregation logic
whale-monitor.ts - Whale tracking functionality
index.ts - Skill exports
1---2name: debank-aggregator3description: DeBank DeFi Portfolio Aggregator4---5# DeBank DeFi Portfolio Aggregator67**K.I.T. Skill for comprehensive DeFi portfolio tracking via DeBank**89## Overview1011DeBank is the leading DeFi portfolio tracker, supporting 1,300+ protocols across all major EVM chains. This skill integrates DeBank's data to provide:1213- Multi-chain portfolio aggregation14- Real-time position tracking (LP, lending, staking, vesting)15- Protocol health monitoring16- Whale wallet tracking17- Transaction history analysis18- NFT holdings1920## Features2122### Portfolio Tracking23- **Multi-Chain Support**: Ethereum, BSC, Polygon, Arbitrum, Optimism, Avalanche, Fantom, Base, zkSync, and 50+ more chains24- **Protocol Coverage**: Uniswap, Aave, Compound, Curve, Convex, Lido, Yearn, GMX, and 1,300+ protocols25- **Position Types**: Tokens, LP positions, lending, borrowing, staking, farming, vesting, NFTs2627### Wallet Intelligence28- **Whale Tracking**: Monitor high-value wallets and their movements29- **Social Features**: Follow wallets, see what "smart money" is doing30- **Transaction Analysis**: Detailed tx history with protocol interactions3132### Risk Monitoring33- **Protocol Health**: Track TVL changes, audits, risks34- **Position Health**: Monitor liquidation risks, IL exposure35- **Chain Exposure**: Understand cross-chain risk distribution3637## Usage3839### Quick Commands4041```typescript42import { DeBank } from '@kit/skills/debank-aggregator';4344// Get full portfolio for an address45const portfolio = await DeBank.getPortfolio('0x...');4647// Get positions in a specific protocol48const aavePositions = await DeBank.getProtocolPositions('0x...', 'aave');4950// Track whale wallets51const whales = await DeBank.getWhaleActivity({ minValue: 1_000_000 });5253// Get token balances across all chains54const balances = await DeBank.getTokenBalances('0x...');5556// NFT holdings57const nfts = await DeBank.getNFTHoldings('0x...');58```5960### K.I.T. Agent Integration6162```63User: "What's the total value of my DeFi positions?"6465K.I.T.: Uses debank-aggregator to fetch all positions:66- Lido stETH: $45,23067- Aave USDC lending: $12,50068- Uniswap V3 ETH/USDC LP: $8,34069- Convex CRV staking: $3,20070Total DeFi Value: $69,27071```7273## API Reference7475### DeBank Open API7677DeBank provides a comprehensive API (some endpoints require API key):7879**Free Endpoints:**80- `/v1/user/total_balance` - Total balance across chains81- `/v1/user/chain_balance` - Balance per chain82- `/v1/user/token_list` - Token holdings83- `/v1/user/complex_protocol_list` - Protocol positions8485**Pro Endpoints (API Key Required):**86- `/v1/user/history_list` - Transaction history87- `/v1/user/nft_list` - NFT holdings88- `/v1/protocol/list` - All supported protocols89- `/v1/whale/list` - Whale wallet data9091### Rate Limits92- Free: 10 requests/second93- Pro: 100 requests/second9495## Configuration9697```json98{99 "debank": {100 "apiKey": "YOUR_DEBANK_API_KEY", // Optional, for pro features101 "watchlist": [102 "0x...", // Your wallets103 "0x..." // Whale wallets to track104 ],105 "alerts": {106 "portfolioChange": 10, // Alert on 10% change107 "protocolRisk": true, // Alert on protocol issues108 "whaleMovement": 100000 // Alert on $100k+ whale moves109 }110 }111}112```113114## K.I.T. Advantages over DeBank UI1151161. **Automation**: Auto-rebalance when positions drift1172. **Alerts**: Custom alerts via Telegram, Discord, etc.1183. **Cross-Platform**: Combine DeFi data with CEX, forex, stocks1194. **AI Analysis**: K.I.T. analyzes positions and suggests optimizations1205. **Tax Integration**: Feed data to tax-tracker skill1216. **Copy Trading**: Copy whale strategies automatically122123## Example Workflows124125### Daily Portfolio Check126```1271. Fetch all positions via DeBank1282. Calculate daily P&L1293. Check liquidation risks1304. Send summary to user131```132133### Whale Copy Trading134```1351. Monitor whale watchlist1362. Detect new positions1373. Analyze opportunity1384. Execute similar position (scaled)1395. Set stop-loss/take-profit140```141142### Yield Optimization143```1441. Scan all yield positions1452. Compare with current rates1463. Identify better opportunities1474. Suggest/execute migration148```149150## Files151152- `debank-client.ts` - API client implementation153- `portfolio-tracker.ts` - Portfolio aggregation logic154- `whale-monitor.ts` - Whale tracking functionality155- `index.ts` - Skill exports