<p>The <code>getrawmempool</code> interface provides this information in the <code>time</code> field, though it is potentially very slow to respond with a large number of transactions in the mempool. It does not record this time once the transaction is removed from the mempool for non-wallet transactions, so it either needs to be gathered from this interface or recorded on addition with the <code>zmq</code> socket. </p>

<pre><code>"result": {
    "89ee39117b4b55e54ace29c631eef80a875ae109a4fbd79ddd10b6f21329e88d": {
        "size": 225,
        "fee": 0.00000573,
        "modifiedfee": 0.00000573,
        "time": 1556802637,
        "height": 574268,
        "descendantcount": 2,
        "descendantsize": 451,
        "descendantfees": 3247,
        "ancestorcount": 1,
        "ancestorsize": 225,
        "ancestorfees": 573,
        "wtxid": "89ee39117b4b55e54ace29c631eef80a875ae109a4fbd79ddd10b6f21329e88d",
        "depends": [

        ]
    }
}
</code></pre>

CC BY-SA 4.0
2019-05-02T16:16:15.113Z
Doesn't `getmempoolentry` give the same information?
Pieter Wuille
CC BY-SA 4.0
2019-05-02T16:43:46.600Z
I assumed they wanted to do bulk analysis.
Claris
CC BY-SA 4.0
2019-05-02T19:28:04.210Z
Thank you both, these are the useful commands One clarification though: am I right that once the transaction is confirmed and gone from the mempool- there is no way to check when it was first seen?
Dmitry Laptev
CC BY-SA 4.0
2019-05-02T19:34:38.097Z
Yes, that information is not kept around. In fact, apart from historical blocks (and only when not pruning), nothing at all is kept around about confirmed transactions (in general you can't test whether a particular transaction was confirmed in the past).
Pieter Wuille
CC BY-SA 4.0
2019-05-02T15:16:28.540Z
2019-05-02T15:16:28.540Z
Claris
<p>I know how to check when a specific transaction was included in the block. But how do I check when my <code>bitcoind</code> node first saw it? I would like to estimate for how long the transaction stayed unconfirmed after it was broadcasted.</p>

<bitcoin-core><bitcoind><bitcoin-cli>
Check when transaction was added to the mempool?
Dmitry Laptev
# Check when transaction was added to the mempool?

(Asked by: username_0 on 2019-05-02)

I know how to check when a specific transaction was included in the block. But how do I check when my `bitcoind` node first saw it? I would like to estimate for how long the transaction stayed unconfirmed after it was broadcasted.

**Tags:** bitcoin-core, bitcoind, bitcoin-cli


---

## 1 answers

### Answer by username_1 on 2019-05-02. Score: 2 | Accepted answer

The getrawmempool interface provides this information in the time field, though it is potentially very slow to respond with a large number of transactions in the mempool. It does not record this time once the transaction is removed from the mempool for non-wallet transactions, so it either needs to be gathered from this interface or recorded on addition with the zmq socket. 
"result": {
    "89ee39117b4b55e54ace29c631eef80a875ae109a4fbd79ddd10b6f21329e88d": {
        "size": 225,
        "fee": 0.00000573,
        "modifiedfee": 0.00000573,
        "time": 1556802637,
        "height": 574268,
        "descendantcount": 2,
        "descendantsize": 451,
        "descendantfees": 3247,
        "ancestorcount": 1,
        "ancestorsize": 225,
        "ancestorfees": 573,
        "wtxid": "89ee39117b4b55e54ace29c631eef80a875ae109a4fbd79ddd10b6f21329e88d",
        "depends": [

        ]
    }
}

> **Comments:**
> **username_2**: Doesn't `getmempoolentry` give the same information?  
> **username_1**: I assumed they wanted to do bulk analysis.  
> **username_0**: Thank you both, these are the useful commands One clarification though: am I right that once the transaction is confirmed and gone from the mempool- there is no way to check when it was first seen?  
> **username_2**: Yes, that information is not kept around. In fact, apart from historical blocks (and only when not pruning), nothing at all is kept around about confirmed transactions (in general you can't test whether a particular transaction was confirmed in the past).  

---

