<p>8 years old, but for the record:</p>
<ol>
<li>indices are usually (always?) a mid-market price; you probably want a real spot trade buy or sell price. Most likely you can only see that spread on the exchange you want to use.</li>
<li>Unless you actually check the order book volumes, you can't be sure the price you see will not slip as you buy/sell with volume.</li>
</ol>
<p>Those differences may make up as much as a couple percent even for small volumes.</p>

CC BY-SA 4.0
2021-02-04T23:59:34.613Z
2021-02-04T23:59:34.613Z
harrym
<p>Other interesting Bitcoin Price APIs that you might consider are those currently provided by Quandl and BitcoinAverage. </p>

<p><a href="https://blog.quandl.com/getting-started-with-the-quandl-api" rel="nofollow noreferrer">https://blog.quandl.com/getting-started-with-the-quandl-api</a></p>

<p><a href="https://bitcoinaverage.com/en/api-collections" rel="nofollow noreferrer">https://bitcoinaverage.com/en/api-collections</a></p>

CC BY-SA 3.0
2017-04-18T20:55:00.523Z
Another one again is https://blockchain.info/api/exchange_rates_api
msmna93
CC BY-SA 3.0
2017-04-18T20:54:33.007Z
2017-04-18T20:54:33.007Z
msmna93
<p>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. </p>

<p>Have a look at their documentation here: <a href="https://1forge.com/forex-data-api/api-documentation" rel="nofollow noreferrer">https://1forge.com/forex-data-api/api-documentation</a></p>

<p>If you’re using JavaScript/Node.JS, PHP, Python or Ruby then you can quickly bring in one of their libraries: <a href="https://1forge.com/forex-data-api/libraries" rel="nofollow noreferrer">https://1forge.com/forex-data-api/libraries</a></p>

CC BY-SA 3.0
2018-04-20T08:24:16.307Z
2018-04-20T08:24:16.307Z
Jacob Davis
<p>Here is an open-source one i found, and the most simple one:</p>
<p><a href="https://github.com/coinconvert/crypto-convert" rel="nofollow noreferrer">https://github.com/coinconvert/crypto-convert</a></p>
<p>Instantly convert cryptocurrency and get price information.</p>
<ul>
<li><p>Top 100 Crypto Currencies Supported</p>
</li>
<li><p>Top 30 Fiats Supported Price &amp;</p>
</li>
<li><p>Ticker information updated on a configurable interval from multiple
secure sources (Binance, Bitfinex, OKEx)</p>
</li>
<li><p>Any pair can be converted, be it Crypto -&gt; Crypto or Fiat -&gt; Crypto.</p>
</li>
</ul>

CC BY-SA 4.0
2021-02-06T22:19:53.100Z
The asker is looking for a source for the Bitcoin price. It's not clear to me why you think that a fullblown trading tool is a fitting answer here. In case this is your project, please note that we require users to disclose when they recommend their own products. If you are looking to advertise your project here, you're probably here for the wrong reason.
Murch
CC BY-SA 4.0
2021-02-04T23:18:34.787Z
2021-02-04T23:18:34.787Z
Nick Malon
<p>Bitcoin does not have <em>one single buy and sell price</em>. Bitcoins are exchanged on many different exchanges, each keeping track of their own market price.</p>

<p>However, <a href="http://bitcoincharts.com/about/markets-api/">BitcoinCharts.com has a useful API</a> that summarises many of the largest exchanges according to their trading volume. You could use that to display the Bitcoin price on your website.</p>

CC BY-SA 3.0
2016-01-13T19:34:18.700Z
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
CC BY-SA 3.0
2016-01-14T07:56:34.870Z
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
CC BY-SA 3.0
2013-06-25T10:58:33.427Z
2013-06-25T10:58:33.427Z
Steven Roose
<p>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.</p>

CC BY-SA 3.0
2013-06-25T17:35:15.820Z
For which exchange?
Stephen Gornick
CC BY-SA 3.0
2013-06-26T06:07:19.037Z
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
CC BY-SA 3.0
2017-04-18T23:01:48.703Z
@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
<api><exchange-rate>
Bitcoin's real-time Buy and Sell price API
Jagdish Ram
# Bitcoin's real-time Buy and Sell price API

(Asked by: username_0 on 2013-06-25)

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.

**Tags:** api, exchange-rate

> **Comments:**
> **username_1**: For which exchange?  
> **username_0**: 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.  
> **username_2**: @username_0 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.  

---

## 5 answers

### Answer by username_8 on 2013-06-25. Score: 9 | Accepted answer

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](http://bitcoincharts.com/about/markets-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.

> **Comments:**
> **username_9**: 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  
> **username_8**: 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.  

---

### Answer by username_3 on 2021-02-04. Score: 0

8 years old, but for the record:

1. indices are usually (always?) a mid-market price; you probably want a real spot trade buy or sell price. Most likely you can only see that spread on the exchange you want to use.
2. Unless you actually check the order book volumes, you can't be sure the price you see will not slip as you buy/sell with volume.

Those differences may make up as much as a couple percent even for small volumes.


---

### Answer by username_4 on 2017-04-18. Score: 0

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

<https://blog.quandl.com/getting-started-with-the-quandl-api>

<https://bitcoinaverage.com/en/api-collections>

> **Comments:**
> **username_4**: Another one again is https://blockchain.info/api/exchange_rates_api  

---

### Answer by username_5 on 2018-04-20. Score: 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>


---

### Answer by username_6 on 2021-02-04. Score: -2

Here is an open-source one i found, and the most simple one:

<https://github.com/coinconvert/crypto-convert>

Instantly convert cryptocurrency and get price information.

* Top 100 Crypto Currencies Supported
* Top 30 Fiats Supported Price &
* Ticker information updated on a configurable interval from multiple
  secure sources (Binance, Bitfinex, OKEx)
* Any pair can be converted, be it Crypto -> Crypto or Fiat -> Crypto.

> **Comments:**
> **username_7**: The asker is looking for a source for the Bitcoin price. It's not clear to me why you think that a fullblown trading tool is a fitting answer here. In case this is your project, please note that we require users to disclose when they recommend their own products. If you are looking to advertise your project here, you're probably here for the wrong reason.  

---

