API - Convert Bitcoin Amount into USD with my Api

0 votes

After apiv2.bitcoinaverage.com is not free anymore I need another solution.

I want to convert an x BTC Amount into USD from the current rate.

My Old Code:

$getrate = "https://apiv2.bitcoinaverage.com/convert/global?from=BTC&to=USD&amount=0.005"; $btcprice = array( 
'price' => 
array( 
'method' => 'GET', 
) 
); 
$priceone = stream_context_create($btcprice); 
$pricetwo = file_get_contents($getrate, false, $priceone); 
$result = json_decode($pricetwo, true);

Can I do the same with api from https://alternative.me/crypto/api/ ?

Any help will be appreciated!!

Mar 2 in Blockchain by Aditya
• 7,280 points
129 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Blockchain

0 votes
1 answer

How to convert Bitcoin rate to USD?

You can use blockchain.info API: URL: https://blockchain.info/ticker Response: { "USD" ...READ MORE

answered Aug 21, 2018 in Blockchain by slayer
• 29,310 points
183 views
0 votes
2 answers

Check Bitcoin Balance with mybitx api https GET url

You can use the PHP Requests library for an ...READ MORE

answered Sep 17, 2018 in Blockchain by Lalit
1,738 views
0 votes
1 answer

BITCOIN TO USD API

You can use blockchain.info API: URL: https://blockchain.info/ticker Response: { "USD" : ...READ MORE

answered Apr 6 in Blockchain by Aditya
• 7,280 points
22 views
0 votes
1 answer

Kotlin Convert Bitcoin value into Satoshi Value

java.lang.NumberFormatException: For input string: "45,586" This means ...READ MORE

answered Apr 12 in Blockchain by Soham
• 8,730 points
29 views
+2 votes
1 answer

Blockchain declining my API key and I cannot understand why.

It's quite easy. Request the API key using ...READ MORE

answered Apr 3, 2018 in Blockchain by Christine
• 15,790 points
1,268 views
0 votes
1 answer

How can I simulate private bitcoin network with random peer discovery?

You can model the whatever network you ...READ MORE

answered May 29, 2018 in Blockchain by Johnathon
• 9,090 points
220 views
0 votes
1 answer

Cant get a specific value in JSON/PHP

Convert the json-string to a php-array and ...READ MORE

answered Sep 11, 2018 in Blockchain by slayer
• 29,310 points
1,869 views
0 votes
1 answer

jsonRPCClient Error with php variables

All you have to do is change ...READ MORE

answered Sep 12, 2018 in Blockchain by digger
• 26,720 points
189 views
0 votes
1 answer

How to get price from bitcoin to USD with api

If I'm not wrong, is this what ...READ MORE

answered Apr 7 in Blockchain by Aditya
• 7,280 points
41 views
0 votes
0 answers

Fatal error: Maximum execution time of 30 seconds exceeded

I am getting this error when I ...READ MORE

May 16 in PHP by Kichu
• 17,220 points
21 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP