<p>Since Bitcoin Core v25.0 (implemented in <a href="https://github.com/bitcoin/bitcoin/pull/23319" rel="nofollow noreferrer">#23319</a>) you can get the transaction fee (and prevouts) in <code>getrawtransaction</code> by setting the last parameter to <code>2</code>.</p>

CC BY-SA 4.0
2023-06-08T10:51:58.827Z
2023-06-08T10:51:58.827Z
Vojtěch Strnad
<p>I want to find the sat/vb of a tx in a mempool. I am using bitcoin-cli to do this.</p>
<p><code>cmd = ['bitcoin-cli', 'getrawtransaction', txid, &quot;true&quot;]</code></p>
<p>This is the command that I extrect the info of the given tx but it only returns the size not the fee. Thus I cannot calculate the sat/vb how can I find how much fee is paid?</p>

<transaction-fees><bitcoin-cli><mempool><getrawtransaction>
How Can I find sat/vb of a given Txid using bitcoin-cli
Gencehan ARPAÇAY
# How Can I find sat/vb of a given Txid using bitcoin-cli

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

I want to find the sat/vb of a tx in a mempool. I am using bitcoin-cli to do this.

`cmd = ['bitcoin-cli', 'getrawtransaction', txid, "true"]`

This is the command that I extrect the info of the given tx but it only returns the size not the fee. Thus I cannot calculate the sat/vb how can I find how much fee is paid?

**Tags:** transaction-fees, bitcoin-cli, mempool, getrawtransaction


---

## 1 answers

### Answer by username_1 on 2023-06-08. Score: 1

Since Bitcoin Core v25.0 (implemented in [#23319](https://github.com/bitcoin/bitcoin/pull/23319)) you can get the transaction fee (and prevouts) in `getrawtransaction` by setting the last parameter to `2`.


---

