About nansen-defi-positions
A command-line skill for examining a wallet’s DeFi positions across protocols and combining them with spot balances. It is for on-chain portfolio research using Nansen account access.
Key features
- 01Query DeFi positions by wallet
- 02View protocol and chain
- 03Inspect value, assets, debts, and rewards
- 04Combine positions with spot balances
Use cases
- 01Review lending and staking exposure
- 02Compare LP positions across protocols
- 03Build a broader view of wallet holdings
MCP support
The skill uses Nansen CLI research commands; it does not describe an MCP integration.
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ nansen-ai/ nansen-cli --skill nansen-defi-positionsAfter installing, type/nansen-defi-positionsin Claude Code to confirm it loaded.
Details
From the project READMEAuthentication
Nansen account API calls accept a selected nansen:api browser session or conventional API key with the same permissions. NANSEN_API_KEY takes precedence; optional primaryEnv preserves configured-key injection. Run nansen auth status for offline selection. Cached access expiry alone permits automatic renewal during an authorized task. Stop on anonymous selection, invalid state, blocked/uncertain renewal or actual auth failure; never drop a credential or fall back to anonymous x402 payment. Browser login does not grant wallet signing, privileged service identity or a persistent MCP integration key. Preserve all confirmation, signing, sanctions and geographic checks below. Browser login is available in CLI 2.0.0 within the macOS arm64 preview scope.
DeFi Exposure
Answers: "What DeFi positions does this wallet have across protocols?"
ADDR=<address>
nansen research portfolio defi --wallet $ADDR
# → protocol_name, chain, total_value_usd, total_assets_usd, total_debts_usd, total_rewards_usd, tokens
nansen research profiler balance --address $ADDR --chain ethereum
# → token_symbol, token_name, token_amount, value_usd per holding
nansen research profiler balance --address $ADDR --chain base
Combine DeFi positions (lending, LPs, staking) with spot balances for a complete picture of on-chain exposure.
Note: portfolio defi may return empty for wallets with no tracked DeFi positions.