Author

Topic: Blockchain.info API confirmation is so long ? (Read 3825 times)

newbie
Activity: 11
Merit: 0
October 10, 2017, 04:55:38 PM
#8
This free service sends you a text or email when your bitcoin transaction has been confirmed:
http://BSIPro.com/bitcoin
full member
Activity: 182
Merit: 101
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
newbie
Activity: 1
Merit: 0
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
newbie
Activity: 33
Merit: 0
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.
hero member
Activity: 910
Merit: 1005
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.
newbie
Activity: 33
Merit: 0
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
newbie
Activity: 33
Merit: 0
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
newbie
Activity: 33
Merit: 0
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 ^^
Jump to: