<p>The time at which a transaction was confirmed can be found in the 4B timestamp in the block header (POSIX time encoding)</p>

<p>To compute average transactions confirmed/hour, you can consider the header timestamp and the number of transactions in each block in your considered timeframe. The first byte following the header represents the number of transactions in the block. However, you may want to exclude the coinbase tx from the transaction count for your purposes.</p>

<p>If you wish to compute the time between broadcasting and confirmation of a given transaction, you must have knowledge of when a transaction was specifically broadcast. Since this is only the case if you broadcast a tx yourself, you cannot compute this exactly. You can however, determine when a tx was first accepted to the mempool of your local node, and use that as a proxy. Bitcoind offers a tx subscription service which publishes newly accepted mempool txs over a zmq interface. By indexing these with local timestamps(time of mempool acceptance), your application can later determine the time passed to the confirmation of a previously indexed tx from a block which includes this tx and the block header timestamp.</p>

CC BY-SA 4.0
2018-12-23T05:10:13.843Z
Worth to note that the 4 byte timestamp in the block header isn't really an accurate description of when the block was actually broadcast to the network.
arubi
CC BY-SA 4.0
2018-12-23T19:48:52.897Z
True though variances should average out over a large enough timeframe. Difficulty adjustment also based on timestamps.
James C.
CC BY-SA 4.0
2018-12-23T20:21:29.057Z
Yea I was only mentioning because the required window in OP was one hour which is pretty short for relying on block times.  But I guess for historical data and less accuracy it's not bad.
arubi
CC BY-SA 4.0
2018-12-24T08:28:11.580Z
Well guys this isn't quit what i was initially looking for, i was looking for a way on getting a bitcoin transaction confirmations timestamps, i.e. the first three confirmations timestamps, so i can analyse the avg time for each confirmation and monitor it network wise.
Sameer Tarawneh
CC BY-SA 4.0
2018-12-22T23:00:09.317Z
2018-12-22T23:05:34.190Z
2018-12-22T23:05:34.190Z
James C.
<p>Well, i'm planning on developing a graph that shows bitcoin transaction average confirmation time per hour , but i have no clue where i can get transaction confirmation timestamps. </p>

<p>I'm running bitcoin core node with whole blockchain and sync up to date.</p>

<p>Any ideas ?</p>

<bitcoin-core>
Monitor bitcoin transaction confirmation timestamps
Sameer Tarawneh
# Monitor bitcoin transaction confirmation timestamps

(Asked by: username_0 on 2018-12-22)

Well, i'm planning on developing a graph that shows bitcoin transaction average confirmation time per hour , but i have no clue where i can get transaction confirmation timestamps.

I'm running bitcoin core node with whole blockchain and sync up to date.

Any ideas ?

**Tags:** bitcoin-core


---

## 1 answers

### Answer by username_1 on 2018-12-22. Score: 2

The time at which a transaction was confirmed can be found in the 4B timestamp in the block header (POSIX time encoding)

To compute average transactions confirmed/hour, you can consider the header timestamp and the number of transactions in each block in your considered timeframe. The first byte following the header represents the number of transactions in the block. However, you may want to exclude the coinbase tx from the transaction count for your purposes.

If you wish to compute the time between broadcasting and confirmation of a given transaction, you must have knowledge of when a transaction was specifically broadcast. Since this is only the case if you broadcast a tx yourself, you cannot compute this exactly. You can however, determine when a tx was first accepted to the mempool of your local node, and use that as a proxy. Bitcoind offers a tx subscription service which publishes newly accepted mempool txs over a zmq interface. By indexing these with local timestamps(time of mempool acceptance), your application can later determine the time passed to the confirmation of a previously indexed tx from a block which includes this tx and the block header timestamp.

> **Comments:**
> **username_2**: Worth to note that the 4 byte timestamp in the block header isn't really an accurate description of when the block was actually broadcast to the network.  
> **username_1**: True though variances should average out over a large enough timeframe. Difficulty adjustment also based on timestamps.  
> **username_2**: Yea I was only mentioning because the required window in OP was one hour which is pretty short for relying on block times.  But I guess for historical data and less accuracy it's not bad.  
> **username_0**: Well guys this isn't quit what i was initially looking for, i was looking for a way on getting a bitcoin transaction confirmations timestamps, i.e. the first three confirmations timestamps, so i can analyse the avg time for each confirmation and monitor it network wise.  

---

