Post
Topic
Board Pools (Altcoins)
Re: [POOL][Scrypt][Scrypt-N][X11] Profit switching pool - wafflepool.com
by
StuffOfInterest
on 07/10/2014, 13:29:38 UTC
OK, the information on the API was very helpful.  Thanks to both Zels and poolwaffle for the samples and explanations.

Last night I put out Miner Control 1.2.1 (with a fix version 1.2.2 this morning) which now supports WafflePool.  With the two API calls it is able to show earning potential along with per algorithm balances and hash rates.  If the stats api is tweaked for sliding window later I'll update to support that but for now I'm using the current day prices in the earnings calculator.

Full details and download links are available on the Miner Control thread.  Example configurations for supporting WafflePool are also provided.

One more question, what is the deal with X13?  It shows in the API but not in the front end.  Doesn't appear to have any miners and shows 0 price but is still sending information.


Oh, this is very useful for MinerControl.  I'm already parsing the output from the stats call to get earnings per algo.


If possible, please don't parse the output of the stats page, there is an API for that (/api/stats), if theres something missing there, let me know and I can see how tough it is to add.


The piece I'm asking about here is for the balance numbers.  Here is the same result reformatted by jsonlint.com for easier reading.

Code:
{
    "scrypt": {
        "hashrate": 0,
        "hashrate_str": "0.00 kH/s",
        "stalerate": 0,
        "stalerate_str": "0.00 kH/s",
        "workers": [],
        "balances": {
            "sent": 0,
            "confirmed": 0,
            "unconverted": 0
        }
    },
    "nscrypt": {
        "hashrate": 0,
        "hashrate_str": "0.00 kH/s",
        "stalerate": 0,
        "stalerate_str": "0.00 kH/s",
        "workers": [],
        "balances": {
            "sent": 0.00177243,
            "confirmed": 0,
            "unconverted": 0
        }
    },
    "x11": {
        "hashrate": 808137,
        "hashrate_str": "808.14 kH/s",
        "stalerate": 0,
        "stalerate_str": "0.00 kH/s",
        "workers": {
            "1KSTYGj25RRQ5i1GNVUGTjUsSyZr4uSPiz_R9": {
                "hashrate": 808137,
                "stalerate": 0,
                "str": "808.14 kH/s",
                "last_seen": 1412611329
            }
        },
        "balances": {
            "sent": 0.02127437,
            "confirmed": 0.00039378,
            "unconverted": 2.220345987e-7
        }
    },
    "x13": {
        "hashrate": 0,
        "hashrate_str": "0.00 kH/s",
        "stalerate": 0,
        "stalerate_str": "0.00 kH/s",
        "workers": [],
        "balances": {
            "sent": 0,
            "confirmed": 0,
            "unconverted": 0
        }
    }
}

One thing I like here is that we have hashrate and balance per algorithm.  Only NiceHash/WestHash gave me that previously.  I'm not too happy seeing numbers like this: "2.220345987e-7".  Hopefully the C# JSON parser handles this format correctly.  It did pass the JSONLint so that is a good sign.

Yep, "e-" and "e+" notation are both valid JSON Smiley  Since some balances are super low and we're returning them as floats (only other option would be as strings, maybe satoshi integers), they come up with scientific notation.

Now, a question.  There are three numbers: sent, confirmed, unconverted.  I want to see if I understand this correctly:

  • sent - BTC transferred from the pool to the address.
  • confirmed - BTC earned and converted.
  • unconverted - approximate BTC of unconverted coins.

Based on this it looks like a person's current balance would be "confirmed + unconverted" although the amount ready for payout is only "confirmed".

Does this sound correct?

This is correct.  Confirmed is how much you have confirmed BTC.  This number should only ever go up (until a payout).  Unconfirmed will vary a bit as exchange rates fluctuate.  On your next payout (assuming you meet the criteria) you'll be paid the amount in Confirmed.