Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mega-cli.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

mega balance

The balance command checks the ETH balance of an account or address on the Mega testnet.

Usage

mega balance [address] [options]

Arguments

ArgumentDescription
addressEthereum address to check (optional if using —account)

Options

OptionDescription
--account <name>Use an account from the keystore instead of an address
-e, --etherShow balance in ether instead of wei

Description

This command retrieves the ETH balance for an address on the Mega testnet. You can either provide an address directly or reference a stored account using the --account flag. By default, the balance is shown in wei, but you can use the --ether flag to display it in ether.

Examples

Check balance of an address

mega balance 0x742d35Cc6634C0532925a3b844Bc454e4438f44e
# Balance: 10000000000000000 wei

Check balance of a stored account

mega balance --account myaccount
# Balance: 10000000000000000 wei

Show balance in ether

mega balance 0x742d35Cc6634C0532925a3b844Bc454e4438f44e --ether
# Balance: 0.01 ETH
mega balance --account myaccount --ether
# Balance: 0.01 ETH