blockchain.scripthash.get_balance
blockchain.scripthash.get_balance
Return the confirmed and unconfirmed balances of a script hash
.
Signature
Function: blockchain.scripthash.get_balance(scripthash, { "include_tokens": true, ...})
Version added: 1.1
scripthash
The script hash as a hexadecimal string.
filter
Filter dict for what transactions/utxos are included in the result. Valid filters are:
include_tokens
- Include all, including those with tokens (default:true
).tokens_only
- Include only those that contain tokens (default:false
).exclude_tokens
- Include only those without tokens (default:false
).offset
- Skip the first n elements (default:0
)limit
- Return at most n elements. Use '0' for no limit (default:0
)For backward compatibility,
include_tokens
,tokens_only
, andexclude_tokens
can be passed as string instead of dict.
Result
A dictionary with keys
confirmed
andunconfirmed
. The value of each is the appropriate balance in satoshis.
Result Example
{
"confirmed": 103873966,
"unconfirmed": 236844
}