Bitcoin calculator

Am creating a website for a client who need a bitcoin calculator converter. The site is all about buying of bitcoin from the users and the user needs to get the price of the bitcoin in USD or any other major currency selected and vice versa. I have really surf the web for tutorials on it but found none useful. I don’t know if anybody has done that before, should please, put me through(it has to be PHP and Javascript)

To get current exchange rates you would probably have to tap into some kind of API.
So you could probably start by searching for a site which offers such an API service.

you can make my work lighter by giving me one of the sites that offers that(that is simple and straight) instead of surfing the web again

Or you can make everyone’s work lighter by not being entitled. I googled “bitcoin API” and found this: lol “make my work lighter”…I actually lol’d


Ok, here’s one site you could have a widget from on your site to calculate bitcoins.

But please read up on the different bitcoins that’s out there, but I guess you already have. :wink:

Their online currency calculator:

Now you have two specific answers. :slight_smile:

1 Like

Hi there programmer,

check out the attachment to see a working example. :winky: (2.3 KB)

It is based on information from these links…

The json file looks like this…

    "time": {
        "updated": "Oct 21, 2018 20:21:00 UTC", "updatedISO": "2018-10-21T20:21:00+00:00", "updateduk": "Oct 21, 2018 at 21:21 BST"
    "disclaimer":"This data was produced from the CoinDesk Bitcoin Price Index (USD). 
     Non-USD currency data converted using hourly conversion rate from",
    "bpi": {
        "USD": {
            "code": "USD", "symbol": "$", "rate": "6,481.1313", "description": "United States Dollar", "rate_float": 6481.1313
        "GBP": {
            "code": "GBP", "symbol": "£", "rate": "4,964.4817", "description": "British Pound Sterling", "rate_float": 4964.4817
        "EUR": {
            "code": "EUR", "symbol": "€", "rate": "5,629.3810", "description": "Euro", "rate_float": 5629.381

So you could also convert to “GBP” or “EUR” if need be.


1 Like

First of all, sorry for my late response, I was out of coverage since that day. Also, thanks for the reply.

But what I want is not just what convert 1btc to USD or vice versa only. An example is this: there will be a calculator where a user type in the amount of btc he wants to sell and see the equivalent in USD or type the amount in USD and see the equivalent btc(type in $50 and see equivalent in btc or type in 0.01 btc and see the equivalent in USD)

Hi there programmer,

no problem check out the version 2 attachment. :winky: (2.4 KB)


1 Like

@coothead Thanks very much for helping me out. It works fine. That is exactly what I want

1 Like

        No problem, you’re very welcome. :winky:

Please, I don’t know if you have that of the ethereum?

Hi there programmer,

yes, I can do Etherium/USD. :winky: (2.4 KB)

I can also do…

  1. Ripple
  2. Bitcoin Cash
  3. Eos
  4. Stellar
  5. Litecoin
  6. Cardano
  7. Tether
  8. Monero
  9. Tron
  10. Iota

…and about 80 more.:rofl:

What exactly are looking for?


Thank you sir and I really appreciate it. Is it possible to have one which works with ajax(as soon as possible as they type the price will show[not requiring the click button])

Hi there programmer.

I expect it is, if I actually knew what you meant. :wonky:

The examples that I supplied are using it.::winky:

Here is something else that I put together earlier… (3.5 KB)

…which may interest you. :biggrin:


Thanks very much sir, what I want is I don’t want the user to click on the submit button before the price is display. e.g. Let say a user want to type 100USD inside the calculator, as soon as he types 1, the equivalent will be display and as soon as he type 10, the equivalent will also display(Something that will work with keyup event handler sir).

Why not try to do it yourself?

Hi there programmer,

does this… (3.0 KB)

…suit your requirements?


Thanks sir, this is exactly what I want

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.