1

Can I get the time stamp on when a transaction was added to the mempool and when it was successfully added to a block?

Is there an API to do this?

1

You cannot get a timestamp for the transaction when it was added to the mempool because transactions do not have a concept of time, only blockNumber. While in the mempool, the transaction's blockNumber parameter is None.

Once a miner has included a transaction into a block, the transaction will update with the appropriate blockNumber that it was included in. That block also has a timestamp associated with it, so you can now get a time that the transaction was included in the blockchain.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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