Basically what I'm looking for is a reliable API that allows for the conversion of an imputed currency amount such as USD/Euro amount and a conversion would be made that would convert the amount to BTC.

I want to also point out that I am not looking to convert hard cash for actual bitcoin. I am only looking to determine the current value conversion of a particular USD/Euro at that particular time period.

I am hoping to use this feature on a current website (HTML/PHP/ETC..) that I am working on.

If anyone can point me to a reliable API that can perform such a task please let me know. Also if you happen to have any guides in regards to implementing/using the API that would also be greatly appreciated.


I want to also point out that I have gathered a few API URLs from numerous websites which can be viewed at the comment section. Now my question is how do I go about choosing the most efficient API and is their any step to step guides, that guides someone in implementing a particular API?


6 Answers 6


See bitcoin-prices.js library for JavaScript (front end, no server-side components needed) that uses free bitcoinaverage.com API.


http://www.xe.com/xecurrencydata/ but it will cost you, or some of the free services like: http://www.coindesk.com/api/ (but you'll have far less functions)


All the API's you've mentioned are reliable in the sense that they have very good uptime availability and have excellently calculated rates for their domains. You have to know why you need a particular rate. The data comes from independent exchanges and various algorithmic meshes of exchange data. But if you need to make the trade yourself, you want to know the likelihood you'll be able to buy or sell at any given price at the time of the rate quote. For this reason, you should pick an API that is relevant directly to where you exchange your funds.

This may seem nitpicky, but Bitcoin is a relatively small market, so a market price is a lot more difficult to determine with accuracy. Even the international foreign exchange market cannot guarantee a magic price you will settle at because fees and delivery mechanisms vary infinitely.


Check this API https://bitaps.com/api/#Market_API

ticker for current exchange rates history for market history


You can get multiple currencies in a single request with Blockchain.info (https://blockchain.info/ticker)


All of the other answers, containing proper API solutions, look good. If you're after a really lo-tech, no-fuss solution, submit an http request to google with the query "1 BTC in USD" (or whatever currency you want to convert to) and then scrape the answer given.

A complete hack compared to a proper API, but that may be easier if you want something quick and dirty.

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