Post
Topic
Board Pools (Altcoins)
Re: [POOL][Scrypt][Scrypt-N][X11] Profit switching pool - wafflepool.com
by
poolwaffle
on 06/10/2014, 19:18:46 UTC

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.