5
3
What is the API to get Bitcoin's real-time Buy price and sell price on my site? and how can get it from to implement in my website developed in PHP.
5
3
What is the API to get Bitcoin's real-time Buy price and sell price on my site? and how can get it from to implement in my website developed in PHP.
7
Bitcoin does not have one single buy and sell price. Bitcoins are exchanged on many different exchanges, each keeping track of their own market price.
However, BitcoinCharts.com has a useful API that summarises many of the largest exchanges according to their trading volume. You could use that to display the Bitcoin price on your website.
Thanks for the info, but I'm trying to add Bitcoin payments to a website and create a BTC invoice based on the current exchange rate and the USD price, I don't know how often people are going to want to pay via BTC and BitcoinCharts has this announcement on their api info page: Don't query more often than once every 15 minutes!, is there any other API or way to get the current exchange rate, thanks – user31889 – 2016-01-13T19:34:18.700
1That reply is quite old. Currently, CoinDesk has a pretty decent price API that takes multiple exchanges into account. Or you can just pick a single exchange and use their price. – Steven Roose – 2016-01-14T07:56:34.870
0
Other interesting Bitcoin Price APIs that you might consider are those currently provided by Quandl and BitcoinAverage.
Another one again is https://blockchain.info/api/exchange_rates_api
0
Check out 1Forge, they provide a free JSON API for several cryptocurrencies (Bitcoin, Etherium, LiteCoin, Ripple, Dash, and Bitcoin Cash). They also provide data for several standard Forex pairs + gold and silver.
Have a look at their documentation here: https://1forge.com/forex-data-api/api-documentation
If you’re using JavaScript/Node.JS, PHP, Python or Ruby then you can quickly bring in one of their libraries: https://1forge.com/forex-data-api/libraries
For which exchange? – Stephen Gornick – 2013-06-25T17:35:15.820
I do not need form a particular exchange, I want to get a global price for buy and sell for bitcoins, so I can decide my exchange rate. – Jagdish Ram – 2013-06-26T06:07:19.037
2@JagdishRam fact is there is no single global price because different exchanges have different prices. If you want an index or average price then there is the coindesk index, the bitpay one and the winkdex. They all have APIs that you can use. However if you want the price for purposes of trading then it makes no sense to use an indexed price. Use the price of the exchange you will actually use. – Abdussamad – 2017-04-18T23:01:48.703