Skip to main content
Version: 0.96.0

token

Supported chain families:
EVM iconEVMSolana iconSolanaAptos iconAptos

Query native or token balance for an address on any supported chain.

Synopsis

Bash
ccip-cli token -n <network> -H <holder> [options]

Description

The token command queries the balance of native tokens (ETH, SOL, APT, etc.) or ERC20/SPL tokens for a specified wallet address. It supports all CCIP-enabled chains including EVM, Solana, Aptos, Sui, and TON.

Options

Required Options

OptionAliasTypeDescription
--network-nstringNetwork chain ID or name (e.g., ethereum-mainnet, solana-devnet)
--holder-HstringWallet address to query balance for

Optional Options

OptionAliasTypeDefaultDescription
--token-tstring-Token address (omit for native token balance)

See Configuration for global options (--rpcs, --format, etc.).

Command Builder

Build your token command interactively:

ccip-cli token Builder

Query native or token balance for an address

Output Options

Control command output format

Format for command output

Enable debug logging

Fill in required fields to generate command
Generated Command
ccip-cli token --rpcs-file ./.env --format pretty

Output Fields

FieldDescription
networkNetwork name
holderWallet address queried
tokenToken symbol (e.g., "USDC") or "native"
balanceRaw balance in smallest units (wei, lamports, etc.)
formattedHuman-readable balance with decimals
symbolToken symbol (for ERC20/SPL tokens)
nameToken name (for ERC20/SPL tokens)
decimalsToken decimal places

Examples

Query native ETH balance

Bash
ccip-cli token -n ethereum-mainnet -H 0x1234567890abcdef1234567890abcdef12345678

Query ERC20 token balance (USDC)

Bash
ccip-cli token \
-n ethereum-mainnet \
-H 0x1234567890abcdef1234567890abcdef12345678 \
-t 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48

Query native SOL balance on Solana

Bash
ccip-cli token -n solana-devnet -H EPUjBP3Xf76K1VKsDSc6GupBWE8uykNksCLJgXZn87CB
Bash
ccip-cli token \
-n avalanche-mainnet \
-H 0xYourAddress \
-t 0x5947BB275c521040051D82396192181b413227A3

Output as JSON

Bash
ccip-cli token -n ethereum-mainnet -H 0x1234... --format json

Example JSON output:

JSON
{
"network": "ethereum-mainnet",
"holder": "0x1234567890abcdef1234567890abcdef12345678",
"token": "USDC",
"balance": "1000000000",
"formatted": "1000.0",
"symbol": "USDC",
"name": "USD Coin",
"decimals": 6
}

Query in a script

Bash
# Get raw balance value
BALANCE=$(ccip-cli token -n ethereum-mainnet -H $WALLET --format json | jq -r '.balance')
echo "Balance: $BALANCE wei"

Multi-Chain Support

The token command supports all CCIP-enabled chain families:

Chain FamilyNative TokenExample Network
EVMETH, MATIC, AVAX, etc.ethereum-mainnet, polygon-mainnet
SolanaSOLsolana-mainnet, solana-devnet
AptosAPTaptos-mainnet, aptos-testnet
SuiSUIsui-mainnet, sui-testnet
TONTONton-mainnet, ton-testnet

See Also

Exit Codes

CodeMeaning
0Success - balance retrieved
1Error (network failure, invalid address, missing arguments)