Wallet portfolio API (DeBank Cloud OpenAPI) covering total balances, token lists, protocol-level DeFi positions, transaction history, and contract/transaction explanations across 90+ EVM chains. Data refreshes within ~1 minute (12-hour worst case).
- 01EVM wallet dashboards
- 02DeFi protocol position decoding
- 03multi-chain net worth aggregation
- 04human-readable transaction explanations
- 05compliance / portfolio reporting
- pnpm add axios
| Variable | Scope | Description |
|---|---|---|
| DEBANK_ACCESS_KEY | Server | DeBank Cloud OpenAPI access key from cloud.debank.com. Sent as the `AccessKey` header (note the exact casing). Server-side only — exposing it lets anyone burn your CU balance. |
Use the DeBank Cloud OpenAPI from a server route with the `AccessKey: ${DEBANK_ACCESS_KEY}` header (custom header, NOT `Authorization`). Base URL: `https://pro-openapi.debank.com/v1`. Common endpoints: `GET /user/total_balance?id=0x...` (USD net worth across all chains), `GET /user/all_token_list?id=0x...` (every token on every supported chain), `GET /user/all_complex_protocol_list?id=0x...` (DeFi positions decoded per protocol — lending, LP, staking, vesting), `GET /user/all_history_list?id=0x...` (cross-chain tx history), `GET /wallet/explain_origin?chain_id=eth&tx=...` (human-readable tx preview for wallet UIs). Each call costs CUs — cache responses by address with a 60s TTL to match DeBank's own refresh cadence.
- ⚑Auth header is `AccessKey` (custom), NOT `Authorization: Bearer` — case matters; many AI-generated snippets get this wrong and 401.
- ⚑DeBank Cloud is paid-only — there is no free tier; you must purchase Compute Units (CUs) up front, and `/user/all_*` endpoints cost 5–20× more CUs than single-chain variants. Prototype with `/user/total_balance` (cheapest) before fanning out.
- ⚑Data freshness is ~1 minute typical, 12 hours worst case for the slowest chains/protocols — never present DeBank balances as 'live' for trading; use a wallet RPC for hot balances.
- ⚑Coverage is 90+ EVM chains; Solana, Bitcoin, Cosmos, Sui, Aptos are NOT supported on the OpenAPI — pair with Zerion or Sim for non-EVM coverage.
- ⚑Schema drift: protocol position payloads (`portfolio_item_list`) include a heterogeneous `detail` object whose shape varies per protocol type (`lending`, `liquidity_pool`, `vesting`, …) — switch on `name`/`detail_types` defensively.