Skip to main content

bb_getbalancehistory RPC Method

Returns a balance history for the specified XPUB or address.

Updated on
Nov 17, 2023

bb_getbalancehistory RPC Method

Please note that this RPC method requires the Blockbook RPC add-on enabled on your QuickNode endpoint.

Parameters

address
string
REQUIRED
Typically a Bitcoin address
object
object
An object specifying additional parameters:
from
string
REQUIRED
The starting Unix timestamp (in seconds) of the time range for which balance history is requested
to
string
The ending Unix timestamp (in seconds) of the time range for which balance history is requested
fiatcurrency
string
The fiat currency in which to convert the balance values
groupBy
integer
The time interval (in seconds) for grouping the balance data

Returns

time
integer
The Unix timestamp (in seconds) representing the end time of the specified time interval
txs
integer
The number of transactions that occurred within the specified time interval
received
string
The total amount of Bitcoin received by the address during the specified time interval
sent
string
The total amount of Bitcoin sent from the address during the specified time interval
sentToSelf
string
The total amount of Bitcoin sent from the address to itself during the specified time interval
rates
object
An object providing exchange rates for the specified fiat currencies
Request
1
curl https://docs-demo.btc.quiknode.pro/ \
2
-X POST \
3
-H "Content-Type: application/json" \
4
--data '{"method": "bb_getbalancehistory", "params": ["bc1qwfgdjyy95aay2686fn74h6a4nu9eev6np7q4fn204dkj3274frlqrskvx0", {"from":"1683684000", "to":"1700042400", "fiatcurrency":"usd", "groupBy":3600}],"id":1,"jsonrpc":"2.0"}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free