debank-cli
v1.0.0
Published
CLI tool for DeBank Pro API - query wallet balances, DeFi positions, tokens, NFTs, and transaction history
Downloads
109
Maintainers
Readme
debank-cli
CLI tool for DeBank Pro API — query wallet balances, DeFi positions, tokens, NFTs, and transaction history from your terminal.
GitHub: https://github.com/lolieatapple/debank-cli
Install
npm install -g debank-cliSetup
Get your API key from cloud.debank.com, then:
debank config set-key YOUR_ACCESS_KEYUsage
debank <command> [options]Wallet / User
# Total balance across all chains
debank user balance 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
# Token balances on a specific chain
debank user tokens 0x... eth
# Token balances across all chains (include small balances with --all)
debank user tokens 0x... --all
# DeFi protocol positions
debank user protocols 0x...
debank user protocols 0x... eth
# NFT holdings
debank user nfts 0x...
debank user nfts 0x... eth
# Transaction history
debank user history 0x... eth
# Token approvals / allowances
debank user approvals 0x... eth
# Chains with activity
debank user chains 0x...Token
# Token info
debank token info eth 0xdac17f958d2ee523a2206206994597c13d831ec7
# Current price
debank token price eth 0xdac17f958d2ee523a2206206994597c13d831ec7
# Historical price
debank token price eth 0xdac17f958d2ee523a2206206994597c13d831ec7 2024-01-01
# Top holders
debank token holders eth 0xdac17f958d2ee523a2206206994597c13d831ec7 20Chain
# List all supported chains
debank chain list
# Chain details
debank chain info ethGas
debank gas ethConfig
# Save API key (persisted to ~/.debank-cli/config.json)
debank config set-key YOUR_ACCESS_KEY
# Show current config
debank config show
# Remove saved key
debank config remove-keyAccount
# Check API unit balance and usage
debank account unitsEnvironment Variable
You can also set the API key via environment variable (takes precedence over saved config):
export DEBANK_ACCESS_KEY=your_keyDevelopment
# Run directly with Bun
bun src/cli.ts user balance 0x...
# Build for Node.js
bun run build
node dist/cli.js user balance 0x...License
MIT
