USD conversion rate API

3

0

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.

myusuf3

Posted 2013-12-18T04:41:27.210

Reputation: 81

You can't get rates that aren't linked to an exchange because that is where the rates come from. – user6972 – 2013-12-23T17:13:24.267

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 – 2014-01-04T04:04:43.107

Here is my related JavaScript project for converting BTC to other currencies on the client side: https://github.com/miohtama/bitcoin-prices - you can change the market data backend with little trouble

– Mikko Ohtamaa – 2014-01-04T09:17:04.313

Answers

3

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.

user10950

Posted 2013-12-18T04:41:27.210

Reputation: 260

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.

Mark S.

Posted 2013-12-18T04:41:27.210

Reputation: 2 540

Nice but I am looking for something for altcoins. – myusuf3 – 2013-12-24T01:07:31.073

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.

Sam Weinberg

Posted 2013-12-18T04:41:27.210

Reputation: 811

The rate depends on the exchange that the user wants to trade on. Each exchange has different rates. – user6972 – 2013-12-21T19:39:02.960

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

Paul Fryer

Posted 2013-12-18T04:41:27.210

Reputation: 129