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, 2022 in Blockchain by Aditya
• 7,680 points
1,033 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,370 points
646 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
2,564 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, 2022 in Blockchain by Aditya
• 7,680 points
652 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, 2022 in Blockchain by Soham
• 9,710 points
842 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
2,083 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
712 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,370 points
2,885 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,740 points
807 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, 2022 in Blockchain by Aditya
• 7,680 points
2,913 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, 2022 in PHP by Kichu
• 19,040 points
752 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP