<p>If you dont want to use ANY 3rd party service, you will need to parse the entire blobkchain and put it inside a database so you can query whatever information you want.</p>

<p>To do that you have two options: </p>

<ul>
<li>code your own parser for blocks/transactions, and here i suggest you using the rcpapi (its all json, nothing crazy) instead of doing it the hard way like <a href="http://codesuppository.blogspot.com.ar/2014/01/how-to-parse-bitcoin-blockchain.html" rel="nofollow">this</a> </li>
<li>use some software which can do it (something like <a href="https://github.com/lirazsiri/blockexplorer" rel="nofollow">blockexporer</a> or <a href="https://github.com/bitcoin-abe/bitcoin-abe" rel="nofollow">Abe</a>)</li>
</ul>

<p>Another piece of advice: before you start downloading the blockchain, you need to set this in your bitcoin.conf</p>

<pre><code># look up historical transactions
txindex=1
</code></pre>

<p>Which allows you to get detailed information about "old" transactions, but this will make grow the blockchain size in your disk significantly</p>

CC BY-SA 3.0
2014-09-12T17:01:59.800Z
If I put the entire blobkchain into a db, it'll become outdated in a few minutes, won't it? I'll have to constantly update the db.
Incerteza
CC BY-SA 3.0
2014-09-12T17:04:40.863Z
Thats why i suggest you using rpcapi: you need to be running a bitcoind somewhere and have a process querying the rcpapi each 10 mins (whatever time you want) and keep your db up-to-date
reiven
CC BY-SA 3.0
2014-09-12T17:29:44.673Z
Sorry, my question was "If I put the entire blobkchain into a db, it'll become outdated in a few minutes, won't it?"
Incerteza
CC BY-SA 3.0
2014-09-12T17:36:09.613Z
The answer is yes, but partially. If you keep a proceses checking for new blocks and their respective transactions and putting it into the db, you are ok. Keep in mind that the 6 confirmation needed gives you some time to parse 6 blocks
reiven
CC BY-SA 3.0
2014-09-12T16:50:50.150Z
2014-09-12T16:56:54.393Z
2014-09-12T16:56:54.393Z
reiven
<p>The standard way to to this is to use software that downloads, parses, and indexes the blockchain. While possible to do create your own software using the <a href="https://en.bitcoin.it/wiki/Protocol_specification" rel="nofollow">bitcoin specification</a>, there are a number of ready-built applications that you can use, such as those listed here: <a href="https://bitcoin.org/en/choose-your-wallet" rel="nofollow">https://bitcoin.org/en/choose-your-wallet</a>. It's going to take a really really long time for the initial download, but once that's done, you'll have access to all the information you're looking for and then some.</p>

<p>In addition, you mention that you would prefer to get the balance in Satoshis? Which ever application you decide to use should give you this option, but just in case that it doesn't, simply take the balance in BTC, and multiply it by 100,000,000.</p>

CC BY-SA 3.0
2014-09-12T17:04:29.170Z
2014-09-12T17:04:29.170Z
John Henry
<p>I have a bitcoin address. How do I get it's balance and the amount of BTC (preferably in Satoshi) it's ever sent and received? I <strong>don't</strong> want to use any <strong>third-party</strong> bitcoin services, I want to do it as <strong>directly</strong> as possible. How can I do that?</p>

CC BY-SA 3.0
2014-09-10T11:34:22.573Z
Is it just one address you want info for? Are you saving the transactions for just one address or are you tabulating multiple addresses? More info (including preferred OS, client etc) will help. What is the scope of the project too? Ps what do you define as first party? Eg are you looking at the BitcoinDaemon on an OS and wanting to avoid API?
Wizard Of Ozzie
CC BY-SA 3.0
2014-09-10T12:30:47.750Z
@AussieCryptocurrency - the goal is get the info I want using **the standard** way, not third-party bitcoin services. That's it. Suppose, this is just one or a few arbitrary addresses - doesn't matter.
Incerteza
CC BY-SA 3.0
2014-09-10T16:00:19.423Z
The standard way, for most people, *is* to use third-party services.  Bitcoin Core (and AFAIK other popular clients) don't support querying arbitrary addresses other than those that are part of the wallet.
Nate Eldredge
CC BY-SA 3.0
2014-09-10T16:53:23.747Z
@NateEldredge, that can't be a standard way because the third-party services themselves obtain that information from somewhere.
Incerteza
CC BY-SA 3.0
2014-09-10T17:09:22.430Z
It's all in the public block chain, but the third party services have custom software to parse and index for arbitrary queries. You could write your own, but the standard software doesn't do it and I'm not aware of off-the-shelf solutions. If there are I'd be happy to know.
Nate Eldredge
CC BY-SA 3.0
2014-09-10T18:25:46.180Z
@NateEldredge, but standard way I mean my own implementation.
Incerteza
<balance><sending><receiving>
Obtain the information about a bitcoin address
Incerteza
# Obtain the information about a bitcoin address

(Asked by: username_0 on 2014-09-10)

I have a bitcoin address. How do I get it's balance and the amount of BTC (preferably in Satoshi) it's ever sent and received? I **don't** want to use any **third-party** bitcoin services, I want to do it as **directly** as possible. How can I do that?

**Tags:** balance, sending, receiving

> **Comments:**
> **username_1**: Is it just one address you want info for? Are you saving the transactions for just one address or are you tabulating multiple addresses? More info (including preferred OS, client etc) will help. What is the scope of the project too? Ps what do you define as first party? Eg are you looking at the BitcoinDaemon on an OS and wanting to avoid API?  
> **username_0**: @AussieCryptocurrency - the goal is get the info I want using **the standard** way, not third-party bitcoin services. That's it. Suppose, this is just one or a few arbitrary addresses - doesn't matter.  
> **username_2**: The standard way, for most people, *is* to use third-party services.  Bitcoin Core (and AFAIK other popular clients) don't support querying arbitrary addresses other than those that are part of the wallet.  
> **username_0**: @username_2, that can't be a standard way because the third-party services themselves obtain that information from somewhere.  
> **username_2**: It's all in the public block chain, but the third party services have custom software to parse and index for arbitrary queries. You could write your own, but the standard software doesn't do it and I'm not aware of off-the-shelf solutions. If there are I'd be happy to know.  
> **username_0**: @username_2, but standard way I mean my own implementation.  

---

## 2 answers

### Answer by username_3 on 2014-09-12. Score: 2 | Accepted answer

If you dont want to use ANY 3rd party service, you will need to parse the entire blobkchain and put it inside a database so you can query whatever information you want.

To do that you have two options:

* code your own parser for blocks/transactions, and here i suggest you using the rcpapi (its all json, nothing crazy) instead of doing it the hard way like [this](http://codesuppository.blogspot.com.ar/2014/01/how-to-parse-bitcoin-blockchain.html)
* use some software which can do it (something like [blockexporer](https://github.com/lirazsiri/blockexplorer) or [Abe](https://github.com/bitcoin-abe/bitcoin-abe))

Another piece of advice: before you start downloading the blockchain, you need to set this in your bitcoin.conf

```
# look up historical transactions
txindex=1

```

Which allows you to get detailed information about "old" transactions, but this will make grow the blockchain size in your disk significantly

> **Comments:**
> **username_0**: If I put the entire blobkchain into a db, it'll become outdated in a few minutes, won't it? I'll have to constantly update the db.  
> **username_3**: Thats why i suggest you using rpcapi: you need to be running a bitcoind somewhere and have a process querying the rcpapi each 10 mins (whatever time you want) and keep your db up-to-date  
> **username_0**: Sorry, my question was "If I put the entire blobkchain into a db, it'll become outdated in a few minutes, won't it?"  
> **username_3**: The answer is yes, but partially. If you keep a proceses checking for new blocks and their respective transactions and putting it into the db, you are ok. Keep in mind that the 6 confirmation needed gives you some time to parse 6 blocks  

---

### Answer by username_4 on 2014-09-12. Score: 1

The standard way to to this is to use software that downloads, parses, and indexes the blockchain. While possible to do create your own software using the [bitcoin specification](https://en.bitcoin.it/wiki/Protocol_specification), there are a number of ready-built applications that you can use, such as those listed here: <https://bitcoin.org/en/choose-your-wallet>. It's going to take a really really long time for the initial download, but once that's done, you'll have access to all the information you're looking for and then some.

In addition, you mention that you would prefer to get the balance in Satoshis? Which ever application you decide to use should give you this option, but just in case that it doesn't, simply take the balance in BTC, and multiply it by 100,000,000.


---

