Check BTC Mainnet Wallet Balance

permalink SUBTC
#balance#btc#check#mainnet#wallet

After receiving Bitcoin, you can check the wallet balance using the wallet_balance endpoint.

Command:

curl -sS -X POST "https://api.subtc.net/v1/btc?mode=wallet_balance" \<br>-H "X-SUBTC-KEY: $KEY" \<br>-H "Content-Type: application/json" \<br>-d "{\"wallet_id\":\"$WID\"}"

Example response (unconfirmed):

{<br>"ok": true,<br>"request_id": "6a08d64267545267",<br>"result": {<br>"addresses": ["bc1q59ct7xwn0qa7kl722vdedaa2ajzkmmu78gm9jl"],<br>"balance_sat": 30000,<br>"coin": "btc",<br>"net": "main",<br>"confirmed_sat": 0,<br>"unconfirmed_sat": 30000,<br>"wallet_id": "w_87d2a561cdd665948c1d756106f7b2179327927c3b8c"<br>}<br>}

After the transaction is confirmed by the Bitcoin network:

{<br>"ok": true,<br>"request_id": "48abe8221c8841bb",<br>"result": {<br>"addresses": ["bc1q59ct7xwn0qa7kl722vdedaa2ajzkmmu78gm9jl"],<br>"balance_sat": 30000,<br>"coin": "btc",<br>"net": "main",<br>"confirmed_sat": 30000,<br>"unconfirmed_sat": 0,<br>"wallet_id": "w_87d2a561cdd665948c1d756106f7b2179327927c3b8c"<br>}<br>}

What happened:

Initially the transaction appears as unconfirmed_sat.<br>After the Bitcoin network confirms the transaction, the amount moves to confirmed_sat.

SUBTC tracks both states so developers can build reliable payment confirmation flows.

API Base:<br>https://subtc.net/api