<p>This question is pretty broad as parsing a node involves decoding every transaction within a block(which would require <code>txindex</code> to be enabled), and recording each output and input until you end up with a list of all outputs that have not been used as an input aka an unspent output.   </p>

<p>With a fully synced node and <code>txindex=1</code> you can begin iterating through each block of the last 200 blocks with loops using the rpc calls <code>getblockhash</code> <code>getblock</code> <code>getrawtransaction</code> and <code>decoderawtransaction</code>, storing the outputs in a database. On each new block you should check every input to see if there is a transaction id matching an output in your existing output database, if there is that output has been spent. The <a href="https://github.com/freewil/node-bitcoin" rel="nofollow noreferrer">node-bitcoin JSON-RPC wrapper</a> should work fine for implementing these calls to your node. As you can imagine this would take some time.  </p>

CC BY-SA 4.0
2019-04-23T23:22:32.983Z
Can you explain what "parsing a node" means here?  Sounds like you mean something like parsing every block in the blockchain?
Jonathan Cross
CC BY-SA 4.0
2018-07-06T03:33:28.943Z
2018-07-06T03:33:28.943Z
m1xolyd1an
<p>I just need to parse a private node and lookup one bitcoin address and get all transactions going in or out of the address preferably using nodeJS within the last 200 or so blocks. Any recommendations?</p>

<transactions><blockchain><full-node>
How would you recommend parsing a private bitcoin core node with nodeJS?
YoungLyon
# How would you recommend parsing a private bitcoin core node with nodeJS?

(Asked by: username_0 on 2018-07-05)

I just need to parse a private node and lookup one bitcoin address and get all transactions going in or out of the address preferably using nodeJS within the last 200 or so blocks. Any recommendations?

**Tags:** transactions, blockchain, full-node


---

## 1 answers

### Answer by username_1 on 2018-07-06. Score: 1

This question is pretty broad as parsing a node involves decoding every transaction within a block(which would require `txindex` to be enabled), and recording each output and input until you end up with a list of all outputs that have not been used as an input aka an unspent output.

With a fully synced node and `txindex=1` you can begin iterating through each block of the last 200 blocks with loops using the rpc calls `getblockhash` `getblock` `getrawtransaction` and `decoderawtransaction`, storing the outputs in a database. On each new block you should check every input to see if there is a transaction id matching an output in your existing output database, if there is that output has been spent. The [node-bitcoin JSON-RPC wrapper](https://github.com/freewil/node-bitcoin) should work fine for implementing these calls to your node. As you can imagine this would take some time.

> **Comments:**
> **username_2**: Can you explain what "parsing a node" means here?  Sounds like you mean something like parsing every block in the blockchain?  

---

