I'm hosting a Listening Bitcoin Node in Capital of Pakistan. I want to know the Block height when Transaction entered the mempool. Right now I'm using the time from the Json format of the Transaction and Checking the Block height against it. Do you guys think that this method is reliable or I fear that transactions in my mempool have more latency than usual node in Europe. Should use an Api to find the Entry Block Height of the transaction?

Please also suggest an api also?

1 Answer 1


Bitcoin Core has a getmempoolentry command. This takes a txid and returns information about that transaction's mempool status. This includes height which is the block height when transaction entered pool.

  • Andrew I was talking about the historical data Jul 22, 2020 at 6:17
  • 1
    @HaseebSaeed You should clarify that in your question. Historical data of this kind is not stored by Bitcoin Core. It isn't relevant or useful to node function so it isn't stored. But you could write a program which records this information for every transaction that enters the mempool. You could use the ZMQ interface to be notified of when a transaction enters the mempool and then use that notification to do getmempoolentry and save the information wherever you want.
    – Ava Chow
    Jul 22, 2020 at 15:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.