Author

Topic: blockchain.info ticker now not working? (Read 947 times)

legendary
Activity: 2214
Merit: 1057
December 20, 2014, 08:11:29 AM
#6
fyi this was fixed as blockchain updated to https, thanks for the suggestion.
legendary
Activity: 2058
Merit: 1015
December 20, 2014, 03:49:19 AM
#5
How often were you hitting the ticker? Did they rate limit you and block your ip temporarily?
full member
Activity: 134
Merit: 100
December 19, 2014, 08:00:58 AM
#4
Are you echoing the variable? Does your server have Curl?
legendary
Activity: 2214
Merit: 1057
December 16, 2014, 09:31:02 AM
#3
thanks have updated the subject line Smiley

the next line is below but is now returning nothing, are you interested in fixing this?

$net_usd = number_format((($usd) * (100 - Settings::fee)) / 100, 2);
legendary
Activity: 1039
Merit: 1004
December 16, 2014, 09:20:28 AM
#2
Don't know why it's not working for you, so I can't fix that.
The data returned from http://blockchain.info/ticker looks ok, I can't run it through your PHP code at the moment but that shouldn't matter since you didn't change it.
I noticed that the data contains unicode chars for currency symbols, but I don't think that is new, so it should just work. But you might want to run a simple PHP test program to check for that.

I can offer one fix for your subject line, though: it's blockchain.info, not blockhain.info. Do I get a bounty now? (just kidding)

Onkel Paul
legendary
Activity: 2214
Merit: 1057
December 16, 2014, 08:31:55 AM
#1
i have the following code running that has suddenly stopped working yesterday to get btc price in usd

$file = file_get_contents("http://blockchain.info/ticker");
    $vars = json_decode($file, true);
    $usd = $vars['USD']['15m'];

has something recently changed in the api? offering a bounty to fix this.
Jump to: