<p>You can get this data by hosting Blockbook and using REST query:</p>
<pre><code>GET /api/v2/address/&lt;address&gt;[?page=&lt;page&gt;&amp;pageSize=&lt;size&gt;&amp;from=&lt;block height&gt;&amp;to=&lt;block height&gt;&amp;details=&lt;basic|tokens|tokenBalances|txids|txs&gt;&amp;contract=&lt;contract address&gt;&amp;secondary=usd]
</code></pre>
<p>Or you can simply use the <a href="https://marketplace.quicknode.com/add-on/blockbook-rpc-add-on" rel="nofollow noreferrer">Blockbook RPC Add-on</a> of <a href="https://www.quicknode.com/marketplace" rel="nofollow noreferrer">QuickNode Marketplace</a>.</p>
<p>Once you have the Add-on enabled on your QuickNode Bitcoin RPC. The method to be used is <code>bb_getaddress</code> and the code should look something like this:</p>
<pre class="lang-javascript prettyprint-override"><code>var myHeaders = new Headers();
myHeaders.append(&quot;Content-Type&quot;, &quot;application/json&quot;);

var raw = JSON.stringify({
  &quot;method&quot;: &quot;bb_getaddress&quot;,
  &quot;params&quot;: [
    &quot;ADDRESS_TO_GET_TXs_AND_BALANCES&quot;,
    {
      &quot;page&quot;: 1,
      &quot;size&quot;: 1000,
      &quot;fromHeight&quot;: 0,
      &quot;details&quot;: &quot;txids&quot;
    }
  ]
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch(&quot;QUICKNODE_BTC_RPC_URL_HERE&quot;, requestOptions)
  .then(response =&gt; response.text())
  .then(result =&gt; console.log(result))
  .catch(error =&gt; console.log('error', error));
</code></pre>

CC BY-SA 4.0
2023-06-28T10:19:15.187Z
2023-06-28T10:19:15.187Z
Sahil - QuickNode
<p>How to get balances and transactions of a Bitcoin address? I'm looking into bitcoin development and relatively new to the space. - Tien</p>

CC BY-SA 4.0
2023-06-14T18:51:38.280Z
Using which wallet software?
Mercedes
<transactions><balance>
Data from address?
Tien
# Data from address?

(Asked by: username_0 on 2023-06-14)

How to get balances and transactions of a Bitcoin address? I'm looking into bitcoin development and relatively new to the space. - username_0

**Tags:** transactions, balance

> **Comments:**
> **username_1**: Using which wallet software?  

---

## 1 answers

### Answer by username_2 on 2023-06-28. Score: 2 | Accepted answer

You can get this data by hosting Blockbook and using REST query:
GET /api/v2/address/[?page=&pageSize=&from=&to=&details=&contract=&secondary=usd]

Or you can simply use the Blockbook RPC Add-on of QuickNode Marketplace.
Once you have the Add-on enabled on your QuickNode Bitcoin RPC. The method to be used is bb_getaddress and the code should look something like this:
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "method": "bb_getaddress",
  "params": [
    "ADDRESS_TO_GET_TXs_AND_BALANCES",
    {
      "page": 1,
      "size": 1000,
      "fromHeight": 0,
      "details": "txids"
    }
  ]
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("QUICKNODE_BTC_RPC_URL_HERE", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));


---

