Access to the number of Ether sold

AranAran Member Posts: 1
edited July 2014 in Ether Sale
I'd like to publish the current number of Ether sold on my site, is there an API call I can make to get that info the same way ethereum.org is getting it? I can get the BTC value from blockchain, but soon the number of Ether will no longer be simply BTC*2000.

Comments

  • StephanTualStephanTual mod London, EnglandMember, Moderator Posts: 1,282 mod
    I don't think we made an API available AFAIK, sorry.
  • bochacobochaco ArgentinaMember Posts: 19
    @Aran, AFAIK the change in the value will be linear after the firs tperiod going from 2000 eth/btc down to 1337 eth/btc on 23:59 Zug time September 2.
    How about just implementing such a linear function on your website based on the given timeframes of the sale and the current timestamp? ...perhaps it's not that accurate but should be close enough...perhaps ethreum team wants to disclosure the exact function??
  • mids106mids106 ✭✭✭ Member Posts: 188 ✭✭✭
    Looking at the minified javascript https://www.ethereum.org/scripts/app.min.js it appears that the total ETH purchased counter is directly derived from the blockchain api call, without taking the daily increasing ETH price adjustment after day 14 in account. The website code will need to be updated or it will keep displaying the ETH bought based on the 2000 ETH/BTC price.

    var u = "36PrZ1KHYMpqSyAQXSG8VwbUiq2EogxLo2"; var m = 1e8; $.ajax({ type: "GET", url: BLOCKCHAIN_URL + "/q/getreceivedbyaddress/" + u + "?cors=true&api_code=" + BLOCKCHAIN_API, crossDomain: !0, success: function(e) { var t = Math.round(parseInt(e, 10)); $("#total-sold-container .total").text(numeral(2e3 * t / m).format("0,0")) }, error: function(e) { console.log("ERROR:", e) });
  • StephanTualStephanTual mod London, EnglandMember, Moderator Posts: 1,282 mod
    @mids106‌ : yes, this is by design - it's going to get updated as the sale progresses. Thanks for taking the time to go through it though :)
Sign In or Register to comment.