Skip to main content
glnc

Field notes

How to check a Bitcoin address balance from the terminal without a full node

by Arya Rahimi · · 7 min read

To check any Bitcoin address balance from the command line, run glnc balance <btc-address>. One command reads any address against the public Blockstream Esplora API, with no node to sync, no account, and no API key. It auto-detects bc1, 1, and 3 formats, so you paste the address and read the answer. The reason this question is hard at all is the interesting part: bitcoin-cli can only report balances for addresses your own node already tracks, and getting it to answer for an arbitrary address is a real project.

The short answer

Paste the address. glnc detects that it is Bitcoin from the prefix and queries a public block explorer API for you:

glnc balance bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh
₿ BITCOIN
Asset Amount USD Value
─────────────────────────────────
BTC 3.654456 $293,292.06
Grand Total $293,292.06

That is the whole task. No wallet to create, no descriptor to import, no chainstate to scan. The number is the sum of confirmed UTXO values for that address, with a USD estimate at the current spot price. The figures here are example output, not a promise about a live address.

The rest of this post explains why the obvious tool, bitcoin-cli, cannot do this nearly as easily, and where running your own node is still the right call.

Why bitcoin-cli cannot easily check an arbitrary address

Bitcoin Core was built to be a wallet and a validating node, not a block explorer. It tracks balances only for addresses that live in a wallet it is already watching. Ask it about an address it has never heard of and it has nothing useful to say:

bitcoin-cli getreceivedbyaddress bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh
error code: -4
error message:
Address not found in wallet

The deeper reason is that the Bitcoin protocol has no global address-to-balance index. The blockchain is a list of transactions, not a ledger keyed by address. So there are only two ways to make Core answer for an address it does not own, and both are heavy.

The first is to import the address as a watch-only entry and rescan the chain so the wallet can find its history:

bitcoin-cli importdescriptors '[{"desc":"addr(bc1qxy2...)#checksum","timestamp":0,"label":"watch"}]'
# timestamp:0 forces a rescan from the genesis block.
# This re-reads the entire chain history and can take
# many minutes to hours depending on disk and CPU.

The second is scantxoutset, which walks the current UTXO set instead of rescanning every historical block. It avoids the wallet import, but it still reads the entire unspent-output set on every call and needs a fully synced node underneath it:

bitcoin-cli scantxoutset start '[{"desc":"addr(bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh)"}]'
{
"success": true,
"txouts": 98213471,
"total_amount": 3.65445600
}

Note txouts: that is roughly the entire UTXO set, scanned to answer one question about one address. People sometimes reach for -txindex here, but it does not solve this problem. -txindex lets you fetch any transaction by its id; it does not build an address index, so it does not give you an address balance either. The honest summary: Bitcoin Core can do it, but only after you have paid the cost of running Bitcoin Core.

What running Bitcoin Core actually costs

Running a full node is a genuinely good thing to do, and the Bitcoin.org full node guide lays out the requirements honestly. The short version is that none of the above is free:

  • Disk. A full node stores the entire block chain, which is hundreds of gigabytes and grows continuously. Pruning helps, but a pruned node cannot rescan arbitrary historical ranges, which is exactly what the watch-only import above needs.
  • Initial block download. Before Core can answer anything, it validates the chain from genesis. On consumer hardware this is hours to days, bounded by disk and bandwidth, not just CPU.
  • Maintenance. The node has to stay online to stay current, and a scantxoutset call competes with that validation work for I/O. The Bitcoin Core documentation is the reference for tuning all of this.

If your goal is to validate the chain yourself, that cost buys you something irreplaceable. If your goal is just to read a balance you saw in someone else's wallet, it is a steep price for a single number.

How glnc reads it without a node

glnc skips the node entirely and asks a public Esplora-style block explorer the same question over HTTP. Balance and UTXO data come from Blockstream's Esplora HTTP API: glnc calls the per-address endpoint, sums confirmed UTXO values, and prices the result against CoinGecko's free public API. There is no account and no API key for the balance check.

Address detection is automatic. glnc reads the prefix and routes the query to Bitcoin without a --chain flag:

  • bc1... is bech32 SegWit (P2WPKH and P2WSH).
  • 1... is legacy P2PKH.
  • 3... is P2SH, including wrapped SegWit.

For anything programmatic, add --json and pull the field you need with jq. The Bitcoin balance lives at the same path as every other chain in the stable, versioned envelope:

glnc balance bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh --json | jq '.data.wallets[0].chains[0].assets[0]'
{
"symbol": "BTC",
"amount": "3.654456",
"decimals": 8,
"native": true,
"priceUsd": 80256.12,
"valueUsd": 293292.06
}

Because the envelope shape is identical across chains, you can check a Bitcoin address and an Ethereum address in the same command and get one portfolio total. glnc detects each address type independently:

glnc balance bc1qxy2... vitalik.eth
━━━━━ bc1qxy2…0wlh ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
₿ BITCOIN
BTC 3.654456 $293,292.06
━━━━━ vitalik.eth (0xd8dA…6045) ━━━━━━━━━━━━━━━
⬢ ETHEREUM (59 tokens)
...
PORTFOLIO TOTAL (2 wallets) $956,500.74

One caveat worth stating plainly: glnc reports native sats on the base chain. It does not track Ordinals, BRC-20 inscriptions, or other inscribed assets, because those live in a layer glnc does not index. If you hold inscribed assets, use a dedicated Ordinals explorer. The full field reference is in the balance command docs, and the chain-specific notes live on the Bitcoin support page.

Bitcoin fees too: glnc gas reads the mempool

Balances are not the only thing you can read without a node. The same binary reads the Bitcoin fee market from mempool.space's public REST API, the same fee tiers that drive the mempool.space dashboard. Run glnc gas and Bitcoin appears in the same table as the EVM chains and Solana:

glnc gas
Chain base p10 p50 p90 block fast avg
──────────────────────────────────────────────────────────
ethereum 12.4 0.5 1.2 3.1 ~12s $0.34 $0.18
bitcoin — — 1 4 ~10m $0.84 $0.21
solana — 0 3000 5000 ~400ms $0.001 $0.00

For Bitcoin the numbers are sat-per-vByte fee tiers rather than gwei percentiles, with a USD estimate for a typical transaction. Add --watch to refresh the fee market in place while you wait for a good moment to broadcast, or scope it with --chain bitcoin. The flags and output fields are covered in the gas command docs.

When you still want Bitcoin Core

glnc is read-only inspection, and it is honest about its boundary. It is the easier path for reading a balance or a fee, but it is not a replacement for your own node. Run Bitcoin Core when:

  • You want to validate the chain yourself. A full node checks every rule against every block instead of trusting an API's answer. That is the entire point of running one, and glnc does not give you it.
  • You want maximum privacy. Querying a public explorer tells that explorer which address you asked about. Your own node answers from local data and leaks nothing about which addresses you care about.
  • You need to sign or broadcast. glnc never holds keys and never moves funds. Spending, signing, and pushing a transaction to the network are wallet and node jobs.

The clean division of labor: use Bitcoin Core for trust, privacy, and spending; use glnc when you just need to read any address balance from the terminal without standing up infrastructure first. For how this compares to reaching for a browser explorer instead, see glnc vs Etherscan.

FAQ

Why can't bitcoin-cli just check any Bitcoin address balance? Bitcoin Core tracks balances only for addresses in a wallet it already watches. To query an arbitrary address you need a fully synced node plus either -txindex or an expensive scantxoutset scan, because the protocol has no global address-to-balance index.

Do I need to run a node or get an API key? No. glnc reads any Bitcoin address against the public Blockstream Esplora API, so there is no node to sync, no account, and no API key for the balance check. Fees come from the public mempool.space API.

Which Bitcoin address formats are supported? It auto-detects bech32 SegWit (bc1...) and legacy formats (addresses starting with 1 or 3), so you can paste the address directly without a chain flag.

Can I also see Bitcoin transaction fees? Yes. glnc gas reads the Bitcoin mempool fee market and shows fee tiers alongside EVM and Solana fees in the same view.

When should I still run Bitcoin Core instead? When you want to validate the chain yourself, maximize privacy by not querying third-party APIs, or sign and broadcast transactions. glnc is read-only inspection; it does not replace your own node for those jobs.

Next, read the full balance command reference or the Bitcoin support page.