Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Sniffdog authored Mar 9, 2018
1 parent 16211f3 commit 432b8f3
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions SniffDogLitecoin.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ while($true)
$LastDonated = Get-Date
}
Write-Host "SniffDog dumps then checks for updates from Cryptonator..." -foregroundcolor "Yellow"
$Rates = [PSCustomObject]@{}
$Currency | ForEach {$Rates | Add-Member $_ (Invoke-WebRequest "https://api.cryptonator.com/api/full/ltc-btc" -UseBasicParsing | ConvertFrom-Json).ticker.price}
$Rates = Invoke-RestMethod "https://api.coinbase.com/v2/exchange-rates?currency=LTC" -UseBasicParsing | Select-Object -ExpandProperty data | Select-Object -ExpandProperty rates
$Currency | Where-Object {$Rates.$_} | ForEach-Object {$Rates | Add-Member $_ ([Double]$Rates.$_) -Force}


#Load the Stats
Expand Down Expand Up @@ -351,17 +351,17 @@ while($true)
Write-Host ""
Write-Host ""
Write-Host ""
$Rates2 = Invoke-RestMethod "https://api.coinbase.com/v2/exchange-rates?currency=LTC" -UseBasicParsing | Select-Object -ExpandProperty data | Select-Object -ExpandProperty rates
$Currency | Where-Object {$Rates2.$_} | ForEach-Object {$Rates2 | Add-Member $_ ([Double]$Rates2.$_) -Force}
Write-Host "1LTC = " $Rates2.$Currency " $Currency" -foregroundcolor "Yellow"
Write-Host "1LTC = " $Rates.$Currency " of a Bitcoin" -foregroundcolor "Yellow"
$ltcBtcRates = Invoke-RestMethod "https://min-api.cryptocompare.com/data/pricemulti?fsyms=LTC&tsyms=BTC" -UseBasicParsing
Write-Host "1LTC = " $ltcBtcRates.LTC[0].BTC " of a Bitcoin" -foregroundcolor "Yellow"
Write-Host "1LTC = " $Rates.$Currency " USD" -foregroundcolor "Yellow"

$Miners | Where {$_.Profit -ge 1E-5 -or $_.Profit -eq $null} | Sort -Descending Type,Profit | Format-Table -GroupBy Type (
@{Label = "Miner"; Expression={$_.Name}},
@{Label = "Algorithm"; Expression={$_.HashRates.PSObject.Properties.Name}},
@{Label = "Speed"; Expression={$_.HashRates.PSObject.Properties.Value | ForEach {if($_ -ne $null){"$($_ | ConvertTo-Hash)/s"}else{"Bench"}}}; Align='center'},
@{Label = "BTC/Day"; Expression={$_.Profits.PSObject.Properties.Value | ForEach {if($_ -ne $null){ $_.ToString("N5")}else{"Bench"}}}; Align='right'},
@{Label = "LTC/Day"; Expression={$_.Profits.PSObject.Properties.Value | ForEach {if($_ -ne $null){ ($_ / $Rates.$Currency).ToString("N5")}else{"Bench"}}}; Align='right'},
@{Label = "$Currency/Day"; Expression={$_.Profits.PSObject.Properties.Value | ForEach {if($_ -ne $null){($_ / $Rates.$Currency * $Rates2.$Currency).ToString("N3")}else{"Bench"}}}; Align='center'},
@{Label = "LTC/Day"; Expression={$_.Profits.PSObject.Properties.Value | ForEach {if($_ -ne $null){ ($_ / $ltcBtcRates.LTC[0].BTC).ToString("N5")}else{"Bench"}}}; Align='right'},
@{Label = "$Currency/Day"; Expression={$_.Profits.PSObject.Properties.Value | ForEach {if($_ -ne $null){($_ / $ltcBtcRates.LTC[0].BTC * $Rates.$Currency).ToString("N3")}else{"Bench"}}}; Align='center'},
@{Label = "Pool"; Expression={$_.Pools.PSObject.Properties.Value | ForEach {"$($_.Name)"}}; Align='center'},
@{Label = "Coins"; Expression={$_.Pools.PSObject.Properties.Value | ForEach {" $($_.Info)"}}; Align='center'},
@{Label = "Pool Fees"; Expression={$_.Pools.PSObject.Properties.Value | ForEach {"$($_.Fees)%"}}; Align='center'},
Expand Down Expand Up @@ -407,8 +407,8 @@ while($true)
[GC]::WaitForPendingFinalizers()
[GC]::Collect()

Write-Host "1LTC = " $Rates2.$Currency " $Currency" -foregroundcolor "Yellow"
Write-Host "1LTC = " $Rates.$Currency " of a Bitcoin" -foregroundcolor "Yellow"
Write-Host "1LTC = " $Rates.$Currency " $Currency" -foregroundcolor "Yellow"
Write-Host "1LTC = " $ltcBtcRates.LTC[0].BTC " of a Bitcoin" -foregroundcolor "Yellow"

#Do nothing for a set Interval to allow miner to run
If ([int]$Interval -gt [int]$CheckMinerInterval) {
Expand Down

0 comments on commit 432b8f3

Please sign in to comment.