-1

My Question is below:

I get the value of one USD's amount in bitcoin using the last value from btc-e (In case someone finds this useful..)

The btc-e api call is https://btc-e.com/api/3/ticker/btc_usd

{"btc_usd":
    {  
    "high":245.196,
    "low":238.75,
    "avg":241.973,
    "vol":1311899.79685,
    "vol_cur":5434.56688,
    "last":242.291,
    "buy":242.9,
    "sell":242.29,
    "updated":1431260454
    }}

The sum is like this

( 1 / ( 242.291 / 100000000 ) ) / 100000000

= 0.004127268449921788       btc-e exchange price for $1 worth of BTC

//0.00411811                 this is similar to blockchain.info's $1 average price

To explain, I am mimicking https://blockchain.info/tobtc?currency=USD&value=1 as it converts the price of one USD to its value in BTC like so:

0.00411811

My question:

I need to somehow do this with http://dogecoinaverage.com/USD

Which states:

The global volume-weighted average price of one Dogecoin is:

0.00009289 USD

Could I use that information to mathematically get the average price of 1USD in DOGE?

Nick ODell
  • 29,396
  • 11
  • 72
  • 130
Ben Muircroft
  • 466
  • 3
  • 16

1 Answers1

3

If x is the number of dogecoins per dollar, then x * 0.00009289 = 1. So

x = 1 / 0.00009289 = 10765.421.

In other words, simply take the reciprocal.

Nate Eldredge
  • 23,040
  • 3
  • 40
  • 80