How do we check the time when a transaction hits x confirmations?

3

1

Consider the transaction 948a427.. which has 3341 confirmations as of now:

enter image description here

We can see that the time the relay is received at 8:36:30 and it has one confirmation at 08:50:04 (after 14 minutes).

How do we find out the exact time when it has 3 confirmations?

Pacerier

Posted 2014-05-23T13:52:23.357

Reputation: 2 055

Answers

4

The first confirmation was in block 298902, so the third confirmation was with block 298904, which is timestamped as 2014-05-03 09:42:49 (66 minutes after it was first received).

However, this timestamp is later than the one in the block after it, suggesting that a timestamp was pretty far off. As Matthieu's answer shows, blockcypher.com's API includes the time that they first saw the transaction. This suggests that the actual time three confirmations was reached was around 2014-05-03T09:31:55.867Z, approximately 59 minutes after the transaction was created (since it was relayed by Blockchain.info, I'm assuming the transaction timestamp there is accurate).

Tim S.

Posted 2014-05-23T13:52:23.357

Reputation: 4 159

That's what I'd thought initially, but that doesn't seem right, because block 298905 is 10 minutes before block 298904... it seems to suggest that I've got 4 confirmations before I had 3?

Pacerier 2014-05-23T14:04:25.463

1

A timestamp is incorrect, probably the one on 298904. There are certain rules for enforcing timestamp correctness, but they have some leeway. (each block references the one before it, so it's quite impossible to have blocks come in out of order)

Tim S. 2014-05-23T14:12:43.907

Do you mean that we have to guess the timing of the confirmations? Shouldn't there be a better way, for example, querying blockchain.info of the time when it receives the broadcast?Pacerier 2014-05-23T14:16:29.037

Yes, that would be good. No, blockchain.info doesn't appear to record that. In fact, I assumed this is what their "Received Time" field should mean. But apparently it's just a repeat of the "Timestamp" field. Perhaps this is due to a simple mistake, which could be fixed for future (maybe also past) blocks. I'll see if I can report this as a bug...Tim S. 2014-05-23T14:43:36.633

1Besides blockchain.info, Are there any other alternatives we can rely on to get this information (timing when block is received)? I do not ask for exact timing, but in-order sequential timing of blocks is crucial. Basically it doesn't make sense if the timing for the 4th confirmation is before the 3rd confirmation....Pacerier 2014-05-23T14:57:29.887

I checked several; they all reported only the timestamp as reported in the block itself.Tim S. 2014-05-23T15:19:39.140

So if what I need is sequential timing, I'm out of luck?Pacerier 2014-05-23T15:39:42.863

If you want it to be based on existing blockchain explorer sites that I've seen? Yes, you're out of luck. If you hit an API, you might be able to do something, e.g. with bitcoind), e.g. by querying it for the latest block number every x seconds (this could be suitable for future transactions, not past ones).

Tim S. 2014-05-23T15:51:11.190

blockchain.info also has an API, which probably could tell you something as simple as the block number quite easily (might have more overhead and worse reliability than a local bitcoind server).Tim S. 2014-05-23T15:54:45.973

I've just noticed some oddity. Blockcypher claims that it received the transaction broadcast at 8:50:25 http://api.blockcypher.com/v1/btc/main/txs/948a4275c9283110e915cbf51eec6831b4736b01dd2f10f084bb95e46aee1f36, but blockchain.info claims that it received the transaction broadcast at 8:36:30.... So it took 14 minutes for blockcypher to receive the broadcast from blockchain.info? (I'd thought usually its a matter of seconds up to a few few minutes at most right?)

Pacerier 2014-05-24T18:38:43.737

The timestamps listed by Blockcypher approximately match the timestamps for the block, not the transaction itself. Either they don't try to show the time they first received the transaction, or they didn't happen to see this transaction until it came in the block (although normally, you're right, it should be just seconds before they see it).Tim S. 2014-05-24T18:49:38.877

@TimeS, The docs claim that it is the time when they received it, on their servers. Exact words from http://dev.blockcypher.com/#transactions: "When the transaction was received by BlockCypher servers.". Also, I've just tested it with transaction 83b1f... . According to http://time.is/ , I did the payment on blockchain.info at 18:52:20. Blockchain.info correctly shows the received time as 18:52:21 http://goo.gl/O1Hif4 and blockcypher correctly shows received time as 18:52:21 http://goo.gl/xEP8I9 . Why is there a 14 minutes delay in receiving previously?

Pacerier 2014-05-24T19:01:22.683

3

As answered by Tim S. the 3rd confirmation is on block 298904. But the received time on blockchain.info is mostly inaccurate, see:

http://api.blockcypher.com/v1/btc/main/blocks/298902 http://api.blockcypher.com/v1/btc/main/blocks/298904 http://api.blockcypher.com/v1/btc/main/blocks/298905

So 298904 was received at 9:31:55 while 298905 was received at 9:32:04.

Matthieu

Posted 2014-05-23T13:52:23.357

Reputation: 866

By the data from your links, Do you mean 298904 at 9:31:55, while 298905 at 9:32:04?Pacerier 2014-05-24T06:56:17.857

Correct, sorry, updated my answer.Matthieu 2014-05-24T15:40:56.957