Author

Topic: Bitcoin to USD (Read 508 times)

sr. member
Activity: 420
Merit: 250
September 23, 2016, 10:17:30 AM
#5
Or when you go to blockchain.info and check the transaction there. As a beginning it shows the value in BTC ,if you single click on that value it shows it's value in USD then.

Here is an example

https://blockchain.info/address/1F6KPtop1urnrxpwuZvskDrc9RE9aP648

This will show all of the transactions of this btc address 1F6KPtop1urnrxpwuZvskDrc9RE9aP648 and it will show their value in BTC, single click on any of them to see their value in USD.
staff
Activity: 3500
Merit: 6152
September 22, 2016, 05:37:47 AM
#4
Brother, thanking you for your quick reply, I already seen those APIs
But tell me if I received 0.0012 BTC then how could I come to know that I received $???.


The first link should give you the price of 1 BTC and return it on JSON , once you get that you do the math. If 1 BTC = 600$ for example then you simply do 600*0.0012 = 0.72$ (72 cents) , as simple as that.
newbie
Activity: 3
Merit: 0
September 22, 2016, 04:58:58 AM
#3
Brother, thanking you for your quick reply, I already seen those APIs
But tell me if I received 0.0012 BTC then how could I come to know that I received $???.
staff
Activity: 3500
Merit: 6152
September 22, 2016, 04:43:13 AM
#2
Hello,
I'm using blockchain api to receive payment using my web app.  When user makes payment I got response on callback url but I received the value in satoshi and if I divided it with 10000000.. then it converts it to btc.
The question is how to convert that btc to usd.?  Is there any api for that or any calculations?
Please help


Bitcoin price is based on supply-demand so there is no calculation for it . It's possible to use Blockchain.info API to get the price , though : https://blockchain.info/api/exchange_rates_api

BTC to USD : https://blockchain.info/ticker
USD to BTC : https://blockchain.info/tobtc?currency=USD&value=500 (where 500 is the USD value)
newbie
Activity: 3
Merit: 0
September 22, 2016, 04:16:08 AM
#1
Hello,
I'm using blockchain api to receive payment using my web app.  When user makes payment I got response on callback url but I received the value in satoshi and if I divided it with 10000000.. then it converts it to btc.
The question is how to convert that btc to usd.?  Is there any api for that or any calculations?
Please help
Jump to: