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.

  • For which exchange? – Stephen Gornick Jun 25 '13 at 17:35
  • 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 Jun 26 '13 at 6:07
  • 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 Apr 18 '17 at 23:01

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.

| improve this answer | |
  • 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 Jan 13 '16 at 19:34
  • 1
    That 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 Jan 14 '16 at 7:56

Other interesting Bitcoin Price APIs that you might consider are those currently provided by Quandl and BitcoinAverage.



| improve this answer | |

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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.