<p>Use <code>getblock</code> with verbosity level 2. e.g.</p>

<pre><code>getblock 0000000000000000000cedb96c93635edfb2755a3357e7febe5929fb6db1658d 2
</code></pre>

<p>This will return the block with all of the transactions already decoded.</p>

<hr>

<p>Since you mentioned that you are doing <code>getrawtransaction</code> and then <code>decoderawtransaction</code>, <code>getrawtransaction</code> has another parameter to decode a transaction for you so you don't have to go to <code>decoderawtransaction</code>. You can do something like</p>

<pre><code>getrawtransaction 0374d2bab7ce78429dc8660fb0100f260e1528dca4854ca7d761dd849211ff75 true
</code></pre>

<hr>

<p>Lastly, most RPCs have a set of options with a description of what they do and an explanation of the output. You can do something lie</p>

<pre><code>help getblock
</code></pre>

<p>to get the help description. In the future, you can do this for any command that you are using so that you can use it to its fullest potential.</p>

CC BY-SA 4.0
2019-11-19T02:00:11.840Z
2019-11-19T02:00:11.840Z
Ava Chow
<p>I would like to extract all transactions in history. 
What I'm presently doing is calling <code>getrawtransaction</code> and than <code>decoderawtransaction</code> for each transaction in the block. This works, except that the extraction process takes forever.</p>

<p>Is there a faster way to do this?</p>

CC BY-SA 4.0
2019-11-26T17:05:41.863Z
you can try this one https://github.com/ragestack/blockchain-parser
Denis Leonov
<json-rpc>
Fast way to get details of all transactions in a block
Arsen Zahray
# Fast way to get details of all transactions in a block

(Asked by: username_0 on 2019-11-19)

I would like to extract all transactions in history.
What I'm presently doing is calling `getrawtransaction` and than `decoderawtransaction` for each transaction in the block. This works, except that the extraction process takes forever.

Is there a faster way to do this?

**Tags:** json-rpc

> **Comments:**
> **username_1**: you can try this one https://github.com/ragestack/blockchain-parser  

---

## 1 answers

### Answer by username_2 on 2019-11-19. Score: 4 | Accepted answer

Use `getblock` with verbosity level 2. e.g.

```
getblock 0000000000000000000cedb96c93635edfb2755a3357e7febe5929fb6db1658d 2

```

This will return the block with all of the transactions already decoded.

---

Since you mentioned that you are doing `getrawtransaction` and then `decoderawtransaction`, `getrawtransaction` has another parameter to decode a transaction for you so you don't have to go to `decoderawtransaction`. You can do something like

```
getrawtransaction 0374d2bab7ce78429dc8660fb0100f260e1528dca4854ca7d761dd849211ff75 true

```

---

Lastly, most RPCs have a set of options with a description of what they do and an explanation of the output. You can do something lie

```
help getblock

```

to get the help description. In the future, you can do this for any command that you are using so that you can use it to its fullest potential.


---

