Bitcoin Forum
May 23, 2024, 05:45:27 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Blockchain.info API confirmation is so long ?  (Read 3802 times)
mad68 (OP)
Newbie
*
Offline Offline

Activity: 33
Merit: 0


View Profile
March 28, 2013, 03:15:35 AM
Last edit: March 28, 2013, 03:43:38 PM by mad68
 #1

Hi everyone !
I use the Blockchain.info receive API and I did a few tests, but the forwarded transactions are never confirmed.
You can see what I mean here : https://blockchain.info/address/1PbRvpNCshRnjXL23BXKv5LZ1HVNgqQEtG
Address I've sent the money from : 1NLpUQFY6MeKDMezQrvTqVq5v4dCeZECBm
Receiving Address : 1PbRvpNCshRnjXL23BXKv5LZ1HVNgqQEtG
Final Address : 1DiiE1yNZV6QM44HHtEEGkvkrpho2De3P4

So you see that the first part of the transaction has been confirmed several times, but the transaction from the Receiving Address to the Final Address is not confirmed yet. I guess it is because of the 0 fees, but what can I do to make this faster ? Is there a way to define fees with the Generating Receiving Addresses API ?

I'm also using the Double Spends security :
Code:
if ($_GET['confirmations'] >= 6) {
    //Insert into confirmed payments
    echo '*ok*';
} else {
    //Insert into pending payments
    //Don't print *ok* so the notification resent again on next confirmation
}

But since there is no confirmations from the Receiving Address to the Final Address (which would makes the calls to the callback url), then my code is only called once, so the transaction is never confirmed in my callback page :S
Or is there a way to get the confirmations of the first part of the transaction (from the address i've sent money from to the Receiving address) ? I know the callback will give the two transaction hash (from the address i've sent money from to the Receiving address, and from Receiving address to Final Address), but with a transaction hash, is there an API to get the number of confirmations of this transaction hash ?
Help ^^
mad68 (OP)
Newbie
*
Offline Offline

Activity: 33
Merit: 0


View Profile
March 28, 2013, 12:52:37 PM
 #2

Well, I've seen no way to specify fees through the API :s
But adding fees would mean 2x fees, I don't know how to make this work
mad68 (OP)
Newbie
*
Offline Offline

Activity: 33
Merit: 0


View Profile
March 28, 2013, 06:09:49 PM
 #3

i had a problem wherei got 1 callback as soon as they sent payment but never again. I found a way around this tho.

i made a php page that gets any waiting confirmation from the database and calls "http://blockchain.info/q/getreceivedbyaddress/{$addressTheyPaid}&confirmations=6"

this will return 0 until 6 confirmations have happened (assuming its not a shared address)

so
if file_get_contents($url) == "0")
// not confirmed
else
// confirmed

i curl this in a cron job every 10 minutes.

hope this helps

Ho yes, I understand what you did there, this is some sort of solution.

I don't know if a blockchain.info API dev will read this but, wouldn't this be a good thing :
Currently, the callback attempts are made when the second transaction (from Receiving Address to Final Address) gets confirmations right ? But this can take up to 24 hours since that transaction has 0 fees.
And the first transaction (From Customer Address to Receiving Address) is confirmed more often since the customer will include fees to his transaction (if he actually does).
So why the callback attempts are not made when the first transaction gets confirmation ?
Am I clear ?  Undecided
piuk
Hero Member
*****
Offline Offline

Activity: 910
Merit: 1005



View Profile WWW
March 29, 2013, 05:17:24 PM
 #4

If you trust blockchain.info the confirmations of the second payment should not matter. We will keep broadcasting the second transaction until it confirms, so although it may take a while it will always confirm eventually.

Otherwise you could manually check the confirmations a ytwg suggested but there are no callbacks for the second transaction.

mad68 (OP)
Newbie
*
Offline Offline

Activity: 33
Merit: 0


View Profile
March 29, 2013, 06:12:41 PM
Last edit: March 29, 2013, 07:09:53 PM by mad68
 #5

If you trust blockchain.info the confirmations of the second payment should not matter. We will keep broadcasting the second transaction until it confirms, so although it may take a while it will always confirm eventually.

Otherwise you could manually check the confirmations a ytwg suggested but there are no callbacks for the second transaction.

For the first you mean ?
The first is the transaction from customer to receiving address, the second is the one from the receiving address to my address right ?
But ok i see, wether I wait for the second transaction to confirms and callbacks, or I manually check confirmations of the first transaction.
peet
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
August 02, 2014, 11:57:59 AM
 #6

You can also use the API of http://chain.so
You need the transaction ID to do so.
That is 9f8c30b1070e5a62981b8b45df3e25be6caaf9b670ad8464610a047d502e2b00 for the mentioned transaction.
https://chain.so/api/v2/is_tx_confirmed/BTC/*transaction ID or HASH*

You can find the number of confirmations for this transaction here in JSON:
https://chain.so/api/v2/is_tx_confirmed/BTC/9f8c30b1070e5a62981b8b45df3e25be6caaf9b670ad8464610a047d502e2b00
gelar24
Full Member
***
Offline Offline

Activity: 182
Merit: 101


View Profile
August 02, 2014, 02:03:37 PM
 #7

Well, I've seen no way to specify fees through the API :s
But adding fees would mean 2x fees, I don't know how to make this work

What was the cost of the API? whether the fee is paid by the ESF API we become bigger?

sorry i do not know Smiley
MrNiceGuy22
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
October 10, 2017, 09:55:38 PM
 #8

This free service sends you a text or email when your bitcoin transaction has been confirmed:
http://BSIPro.com/bitcoin
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!