Bitcoin Forum
December 03, 2016, 08:02:40 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Checking the number of confirmations  (Read 913 times)
GCInc.
Hero Member
*****
Offline Offline

Activity: 566


View Profile WWW
May 02, 2012, 07:11:36 PM
 #1

This must be a simple question, the answer for which has evaded us for too long -

What ways are there to programmatically check the number of realtime confirmations for a single transfer (transaction)?

I know there is blockchain.info with for instance this: http://blockchain.info/tx-index/4646689/9b441b2bee99dc5611757a25a22140aa6488f25fcbf26b5fddb324724abc1fe9

from which the correct value could be parsed, but is there a simpler API somewhere that simply shows the number of confirmations? Blockchain.info rawtx does not show that, nor does blockexplorer.com?

1480795360
Hero Member
*
Offline Offline

Posts: 1480795360

View Profile Personal Message (Offline)

Ignore
1480795360
Reply with quote  #2

1480795360
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
Remember remember the 5th of November
Legendary
*
Offline Offline

Activity: 1526

Reverse engineer from time to time


View Profile
May 02, 2012, 07:15:14 PM
 #2

Bitcoin's own RPC command listtransactions? Or better yet, there was one to fetch a specific tx.

BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
GCInc.
Hero Member
*****
Offline Offline

Activity: 566


View Profile WWW
May 02, 2012, 07:21:28 PM
 #3

I mean "from the web", without bitcoin running.

Quote
there was one to fetch a specific tx
Exactly, but I suppose that requires bitcoin running on one's server?

grue
Global Moderator
Legendary
*
Offline Offline

Activity: 1932



View Profile
May 02, 2012, 07:58:07 PM
 #4

I mean "from the web", without bitcoin running.

Quote
there was one to fetch a specific tx
Exactly, but I suppose that requires bitcoin running on one's server?
If you ran a local bitcoin instance, it will be as easy as an RPC call. but if you really want to do it without a local instance, you can go on blockexplorer.com, check the transaction, and subtract the current # of the blocks from when it first appeared.

It is pitch black. You are likely to be eaten by a grue.

Tired of annoying signature ads? Ad block for signatures
GCInc.
Hero Member
*****
Offline Offline

Activity: 566


View Profile WWW
May 02, 2012, 08:07:16 PM
 #5

check the transaction, and subtract the current # of the blocks from when it first appeared.
Nice, perhaps a little more trustworthy than parsing the blockchain.info html. However that requires two http calls (getting the transaction, and the current block count) so I need to assume there really isn't a simpler way to do that without running a bitcoin instance.

Stephen Gornick
Legendary
*
Offline Offline

Activity: 1988



View Profile
May 02, 2012, 10:25:31 PM
 #6

What ways are there to programmatically check the number of realtime confirmations for a single transfer (transaction)?

If you can use a 3rd party:
 - http://www.bitcoinmonitor.net
 - http://bitping.net

And possibly there might be something coming from ZipConf:
 - http://zipconf.com
 - http://zipconf.com/api

DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218


Gerald Davis


View Profile
May 02, 2012, 10:30:52 PM
 #7

without running a bitcoin instance.

Simpler or not you really shouldn't be trusted anyone else.  No 3rd party provides any SLA on the data (eventually Bitcoin will need something akin to a financial services company which provides data under contract for a fee).

If attacker learns you are using bitcoin.info then the attack becomes to hit bitcoin.info and change the data provided.

Make that 0-confirm look like a 6-confirm and rob you blind.   No matter how good your back end is you leave yourself vulnerable to third party attack.

Eventually I do imagine a contracted & bonded data provider using strong encryption and an API would provide commercial services but we aren't there yet. Smiley  Good business idea though.
grue
Global Moderator
Legendary
*
Offline Offline

Activity: 1932



View Profile
May 02, 2012, 10:43:09 PM
 #8

without running a bitcoin instance.

Simpler or not you really shouldn't be trusted anyone else.  No 3rd party provides any SLA on the data (eventually Bitcoin will need something akin to a financial services company which provides data under contract for a fee).

If attacker learns you are using bitcoin.info then the attack becomes to hit bitcoin.info and change the data provided.

Make that 0-confirm look like a 6-confirm and rob you blind.   No matter how good your back end is you leave yourself vulnerable to third party attack.

Eventually I do imagine a contracted & bonded data provide using strong encryption and an API would provide commercial services but we aren't there yet. Smiley  Good business idea though.
a better idea would be a bitcoind fork that provides additional api functionality.

It is pitch black. You are likely to be eaten by a grue.

Tired of annoying signature ads? Ad block for signatures
Herbert
Hero Member
*****
Offline Offline

Activity: 488



View Profile WWW
May 03, 2012, 09:41:02 AM
 #9

a better idea would be a bitcoind fork that provides additional api functionality.
My bitcoind fork used for bitcoinmonitor.net (https://github.com/TripleSpeeder/bitcoin) enables exactly this: Retrieving Transaction information for all transactions, not just transactions related to your wallet. And as far as i know there is a pull request existing for a similar feature which hopefully makes it into the 0.7 official bitcoin release.


BTT: Is there really no public API existing yet for this Shocked?

I think i can add this to the bitcoinmonitor.net api. Something like
Code:
http://www.bitcoinmonitor.net/api/v1/transaction/<tx_hash>/
which replies with the number of confirmations and probably some more details.

Is there demand for it? Should be a no-brainer to implement...

www.bitcoinmonitor.net - Free payment notification via email, newsfeed, xpmm/jabber, url callback and full API access!
Send SMS with www.txt4coins.net! No registration, pay-per-use, full API access, bulk messages - All inclusive!
GCInc.
Hero Member
*****
Offline Offline

Activity: 566


View Profile WWW
May 04, 2012, 08:18:59 PM
 #10

which replies with the number of confirmations and probably some more details.
Is there demand for it? Should be a no-brainer to implement...
Sure there is. Would be a nice addition to your service's features.

The problem about using third party services, as pointed out earlier, however remains. Using services crafted by various operators with fairly unestablished reputation "as is" poses risks that some merchants are nevertheless ready to accept.

To a high extent the adoption of third party services is indeed a question of psychology. For instance, in the past I tried bitcoinmonitor.net and (for some reason that I can't recall) became suspicious of the service's reliability. It is very hard to regain trust once gone for any reason - there are numerous points of failure outside the service provider's control.

Currently pretty much the only service I would trust enough off the elbow is blockexplorer.com. I can't point out the exact reasons for that, which of course is rather irrational. But maybe telling that serves to help you guys provide useful third party services that merchants will benefit from, even when that means taking controlled risks in handing away the strict requirement of authenticity.

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!