3

I want to build an mobile application which tells you how much your bitcoins are worth in USD. I would like to know of good API that I can rely on for data. As well as historic conversion rates over time.

Example.

I have 5 bitcoins -> which are worth 5031 USD.

Bonus points for other alt-currencies included in said API.

I would like something that isn't linked to a particular service or exchange.

3
  • You can't get rates that aren't linked to an exchange because that is where the rates come from.
    – user6972
    Dec 23, 2013 at 17:13
  • As user6972 mentioned that is where rates come from. Someone has to publish order books so others can understand what currencies are selling for. Bitdango aggregates/combines market prices when it computes currency pair exchange rates, so at least you are getting the average, instead of a single price at one exchange, etc.
    – Paul Fryer
    Jan 4, 2014 at 4:04
  • Here is my related JavaScript project for converting BTC to other currencies on the client side: github.com/miohtama/bitcoin-prices - you can change the market data backend with little trouble Jan 4, 2014 at 9:17

4 Answers 4

3
+25

It will never be accurate unless you know the preferred exchange for your user, because as you can see the prices are different for each exchange. Go to this website http://bitcoin-analytics.com, and click on "Arbitrage", you will see the difference in exchange rates from multiple sources.

Your best bet is to ask the user to choose their exchange or if they have a preferred one, and use their API, which means you'll need to use multiple APIs for most popular exchanges, like mtgox.com, bitstamp.net, btc-e.com..etc, I would also consider which geographical area you are targeting, it would help you identify who are the ones you need to have.

Good luck.

2

I personally like what BitPay is doing. This is tied to their service, but it uses a rather ingenious spread of data from multiple exchanges. They use what is called the Bitcoin Best Bid (BBB). They pull in market data from several exchanges and create a giant table of all buy and sell orders.

The BBB is calculated by simulating an auto-routing market sell order, across all exchanges, with zero commission fees.

For additional information see the link below:

https://bitpay.com/bitcoin-exchange-rates

The api is available here:

https://bitpay.com/api/rates

It is updated once a minute.

1
  • Nice but I am looking for something for altcoins.
    – myusuf3
    Dec 24, 2013 at 1:07
1

The Bitcoin Charts API has current USD/BTC exchange rates sourced from MtGox.com, as well as historic trade data.

There is also the Cryptsy API and Vircurex API for alternate cryptocurrencies. I'm not sure if these would fit your needs, but they are worth looking into.

1
  • The rate depends on the exchange that the user wants to trade on. Each exchange has different rates.
    – user6972
    Dec 21, 2013 at 19:39
0

Bitdango has a free API to access currency pair prices. To get the one you indicated (BTC/USD), simply use this JSON endpoint:

https://bitdango.com/api/currencypairs/BTCUSD

You also mentioned you want more currency pairs, Bitdango tracks all the major crypto currency pairs and provides exchange rates with all the major fiat currencies, etc. Here is the API to search currency pairs:

https://bitdango.com/api/currencypairs

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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