debank-portfolio-scraperlisted
Install: claude install-skill RoXsaita/debank-portfolio-skill
# DeBank Portfolio Scraper
Scrape comprehensive portfolio snapshots from DeBank using browser automation, with optional OpenSea integration for LP position entry prices.
## Prerequisites
- **Playwright MCP** - Browser automation for DeBank navigation
- **OpenSea MCP** - NFT/LP position data (optional but recommended)
- **Node.js 18+** - For running persistence scripts
- **SQLite** - Database for historical data
See `references/setup-guide.md` for installation details.
## Usage
```
scrape-portfolio <wallet_address>
scrape-portfolio --all # Scrape multiple wallets from a config file
```
## Data Sources
1. **DeBank (Playwright)** - DeFi positions, wallet balances, health rates
2. **OpenSea API** - NFT holdings (Uniswap LP position NFTs with entry prices)
## Instructions
### Step 1: Navigate to DeBank
```
browser_navigate: https://debank.com/profile/{address}
```
### Step 2: Wait for Page Load
```
browser_wait_for: time=5
```
### Step 3: Take Snapshot
```
browser_snapshot
```
### Step 4: Expand Hidden Chains
Look for "Unfold X chains" in the snapshot. If present:
```
browser_click: ref=<unfold_button_ref>
browser_wait_for: time=2
browser_snapshot
```
### Step 5: Extract Portfolio Data
Parse the snapshot and extract:
**Profile:**
- Total value (e.g., `$36,694`)
- 24h change percentage
- Account age in days
**Chain Allocation:**
- Chain name, value, percentage
**Wallet Tokens:**
- Symbol, chain, price, amount, USD value
**Protocol Positions:**
For each prot