Skip to main content
GET
/
api
/
v1
/
onchain
/
balance
Get on-chain balance
curl --request GET \
  --url https://api.example.com/api/v1/onchain/balance
{
  "confirmed_sat": 1,
  "immature_sat": 1,
  "total_sat": 1,
  "trusted_pending_sat": 1,
  "trusted_spendable_sat": 1,
  "untrusted_pending_sat": 1
}

Response

200 - application/json

Returns the on-chain balance

confirmed_sat
integer<int64>
required

Confirmed and immediately spendable balance

Required range: x >= 0
immature_sat
integer<int64>
required

All coinbase outputs not yet matured

Required range: x >= 0
total_sat
integer<int64>
required

All of them combined.

Required range: x >= 0
trusted_pending_sat
integer<int64>
required

Unconfirmed UTXOs generated by a wallet tx

Required range: x >= 0
trusted_spendable_sat
integer<int64>
required

Get sum of trusted_pending and confirmed coins.

This is the balance you can spend right now that shouldn't get canceled via another party double spending it.

Required range: x >= 0
untrusted_pending_sat
integer<int64>
required

Unconfirmed UTXOs received from an external wallet

Required range: x >= 0