<p>The easiest way would be to use the API of a block explorer. Several provide such an API and some have wrapper libraries for C#.</p>

<p>For example the blockchain.info blockchain explorer has such an <a href="https://blockchain.info/api" rel="nofollow">API</a> and has a C# wrapper as well. Consult their <a href="https://blockchain.info/api/blockchain_api" rel="nofollow">Blockchain Data API</a> which explains how to get the balance (among other data) from an address. More specifically, you need to call the following (HTTP) API:</p>

<pre><code>https://blockchain.info/address/$bitcoin_address?format=json
</code></pre>

<p>The result is a json object and "final_balance" is what you need.</p>

<p>If you use the C# wrapper you can find an example on how to get the balance of an address (and many other things) <a href="https://github.com/blockchain/api-v1-client-csharp/blob/master/docs/blockexplorer.md" rel="nofollow">here</a>.</p>

<p>Alternatively, you could query a bitcoin node directly. The easiest way to do that in C# would be to use a <a href="https://github.com/GeorgeKimionis/BitcoinLib" rel="nofollow">wrapper library</a>.</p>

CC BY-SA 3.0
2016-01-13T19:38:12.060Z
ok, i'll look into the Blockchain Data API and see if I can figure it out. Thanks
user31889
CC BY-SA 3.0
2016-01-15T09:59:33.187Z
I edited the answer to add the API needed plus an example using the C# wrapper library.
karask
CC BY-SA 3.0
2016-01-13T18:56:52.730Z
2016-01-13T21:01:46.217Z
2016-01-13T21:01:46.217Z
karask
<p>im new to bitcoin and want to find out which is the best API or way for getting the bitcoin balance of a bitcoin address for any bitcoin address in C#</p>

<website-integration>
getting the unspent bitcoins based on bitcoin address
user31889
# getting the unspent bitcoins based on bitcoin address

(Asked by: username_0 on 2016-01-13)

im new to bitcoin and want to find out which is the best API or way for getting the bitcoin balance of a bitcoin address for any bitcoin address in C#

**Tags:** website-integration


---

## 1 answers

### Answer by username_1 on 2016-01-13. Score: 1

The easiest way would be to use the API of a block explorer. Several provide such an API and some have wrapper libraries for C#.

For example the blockchain.info blockchain explorer has such an [API](https://blockchain.info/api) and has a C# wrapper as well. Consult their [Blockchain Data API](https://blockchain.info/api/blockchain_api) which explains how to get the balance (among other data) from an address. More specifically, you need to call the following (HTTP) API:

```
https://blockchain.info/address/$bitcoin_address?format=json

```

The result is a json object and "final\_balance" is what you need.

If you use the C# wrapper you can find an example on how to get the balance of an address (and many other things) [here](https://github.com/blockchain/api-v1-client-csharp/blob/master/docs/blockexplorer.md).

Alternatively, you could query a bitcoin node directly. The easiest way to do that in C# would be to use a [wrapper library](https://github.com/GeorgeKimionis/BitcoinLib).

> **Comments:**
> **username_0**: ok, i'll look into the Blockchain Data API and see if I can figure it out. Thanks  
> **username_1**: I edited the answer to add the API needed plus an example using the C# wrapper library.  

---

