Title: Blockchain.info API confirmation is so long ? Post by: mad68 on March 28, 2013, 03:15:35 AM 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) { 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 ^^ Title: Re: Blockchain.info API confirmation is so long ? Post by: mad68 on March 28, 2013, 12:52:37 PM 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 Title: Re: Blockchain.info API confirmation is so long ? Post by: mad68 on March 28, 2013, 06:09:49 PM 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 ? :-\ Title: Re: Blockchain.info API confirmation is so long ? Post by: piuk on March 29, 2013, 05:17:24 PM 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. Title: Re: Blockchain.info API confirmation is so long ? Post by: mad68 on March 29, 2013, 06:12:41 PM 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. Title: Re: Blockchain.info API confirmation is so long ? Post by: peet on August 02, 2014, 11:57:59 AM 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 Title: Re: Blockchain.info API confirmation is so long ? Post by: gelar24 on August 02, 2014, 02:03:37 PM 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 :) Title: Re: Blockchain.info API confirmation is so long ? Post by: MrNiceGuy22 on October 10, 2017, 09:55:38 PM This free service sends you a text or email when your bitcoin transaction has been confirmed:
http://BSIPro.com/bitcoin |