Skip to main content

Portfolio Endpoint

Retrieve token balances, PnL, and NFT holdings for the authenticated wallet.

Endpoint

GET /wallet/portfolio

Query Parameters

ParameterTypeDescriptionRequired
chainsstringComma-separated chain filter (e.g. base,solana)No
showLowValueTokensbooleanInclude tokens under $1 USDNo
includestringComma-separated: pnl, nftsNo

Supported chains: base, polygon, mainnet, unichain, worldchain, arbitrum, bnb, solana

Response

Success (200 OK)

{
"success": true,
"evmAddress": "0x1234...5678",
"solAddress": "5DcK...NdR",
"balances": {
"base": {
"nativeBalance": "0.5",
"nativeUsd": "1250.00",
"tokenBalances": [
{
"network": "base",
"token": {
"balance": 1000,
"balanceUSD": 1000,
"baseToken": {
"name": "USD Coin",
"address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"symbol": "USDC",
"price": 1,
"imgUrl": "https://..."
},
"pnl": {
"realizedPnl": 0,
"unrealizedPnl": 0,
"totalPnl": 0,
"averageEntryPrice": 1
}
}
}
],
"total": "2250.00"
}
},
"nfts": [
{
"name": "My NFT #1",
"tokenId": "1",
"collection": { "name": "Cool NFTs", "address": "0x..." },
"chain": "base"
}
]
}
note
  • pnl field only present when ?include=pnl is set
  • nfts array only populated when ?include=nfts is set
  • Tokens below $1 USD are filtered by default — use ?showLowValueTokens=true to include them

Backward Compatibility

GET /wallet/balances is an alias for /wallet/portfolio (without include params).

GET /agent/balances still works but is deprecated — it requires walletApiEnabled on your API key.

Examples

curl

# Basic balances
curl https://api.bankr.bot/wallet/portfolio \
-H "X-API-Key: your_api_key_here"

# With PnL
curl "https://api.bankr.bot/wallet/portfolio?include=pnl" \
-H "X-API-Key: your_api_key_here"

# With PnL + NFTs, Base only
curl "https://api.bankr.bot/wallet/portfolio?include=pnl,nfts&chains=base" \
-H "X-API-Key: your_api_key_here"

Bankr CLI

bankr wallet portfolio
bankr wallet portfolio --pnl
bankr wallet portfolio --nfts
bankr wallet portfolio --all --chain base
bankr wallet portfolio --json