MrPlusGH/NPlusMiner

NiceHash poolbalance values are incorrect

UselessGuru opened this issue ยท 1 comments

The unpaidAmount in

$TempBalanceData = Invoke-ProxiedWebRequest ("$($APIUri)$($Wallet)/rigs") -UseBasicParsing | ConvertFrom-Json

gets reset every 4hrs.
-> Data is only correct for the first 4hrs per day ๐Ÿ‘Ž

[Double]$NHTotalBalance = [Double]($TempBalanceData.unpaidAmount) + [Double]($TempBalanceData.externalBalance)

That is why we're adding up externalBalance to get the full value. Problem is that the NiceHash API does not always set both values accordingly in time. So the 1hr value might be wrong at the time of reset. But it corrects itself after 1 hour and the 6hr and 24hr values are still correct.