Author

Topic: Price displaying website like Coinmarketcap (Read 604 times)

newbie
Activity: 51
Merit: 0
December 18, 2015, 10:20:39 PM
#4
It's all about the endpoint, for example: https://api.coinbase.com/v1/prices/spot_rate?currency=USD

It spits out json encoded data and you have to decode it.


Code:
$raw_coinbase_price_now file_get_contents('https://api.coinbase.com/v1/prices/spot_rate?currency=USD');

$json json_decode($raw_coinbase_price_now);
$coinbase_price $json->amount;
$coinbase number_format($coinbase_price2);
echo $coinbase;
?>

full member
Activity: 195
Merit: 100
December 18, 2015, 09:50:51 PM
#3
yes there is an easier way to do it, use iframes, it isnt pretty but it gets the job done

Thanks for that info. It's not precisely what I am looking for but something quick.
sr. member
Activity: 266
Merit: 250
December 18, 2015, 09:32:59 PM
#2
yes there is an easier way to do it, use iframes, it isnt pretty but it gets the job done
full member
Activity: 195
Merit: 100
December 18, 2015, 09:28:37 PM
#1
I am looking to make a website to show the price of different altcoins like Coinmarketcap. I looked around and it seems to be all about modifying the api to set it up according to my needs.

I am wondering if there is any tutorial to learn how to fetch coins prices from sources. Also is there any easier way to do this? I am looking forward to everyone's replies Smiley
Jump to: