Untitled

 avatar
unknown
plain_text
3 years ago
1.9 kB
1
Indexable
import requests
#import gui

name = ""
name2 = ""
ethad = ""



#window = gui.Window("HashFlow Systems Info (HFSI)", layout="pack", master=None)

print("Welcome to HashFlow Systems Info (HFSI)")

#btn = window.add_button("Click Me")

#gui.on("btnPress", btn, lambda: print("Button Pressed."))

#window.start()

print("Starting login auth..")

CMDLOGIN = input("Enter Your Username: ")

if CMDLOGIN == 'ozi':
    name = "ozi1"
    name2 = "ozi2"
    ethad = 'https://eth.2miners.com/api/accounts/0x9c911070bc1ee63932df100b4e113281b2109ba7'

if CMDLOGIN == 'ronan':
    name = "Ronan1"
    name2 = "Ronan2"
    ethad = 'https://eth.2miners.com/api/accounts/0x43E6cA3Ef1796C352ab185f622453546d6451A6a'

headers = {
    'accept': 'application/json',
}

response = requests.get(ethad, headers=headers).json()
json_data = response

response1 = requests.get('https://www.binance.com/api/v3/ticker/price?symbol=ETHBUSD').json()

json_data1 = response1

ethprice = json_data1["price"]

#formatted_address = json_data["payments"][0]
	
HashrateOzi1 = json_data["workers"][name]["rhr"]

HashrateOzi2 = json_data["workers"][name2]["rhr"]

balance_eth = json_data["stats"]["balance"]

Reported_Hashrate_Cb = ((HashrateOzi1 + HashrateOzi2)* 1e+9)

Report_HashrateBateToGB = (Reported_Hashrate_Cb / 1e+18)

Report_HashrateBateToGB_Fix = ("{:.2f}".format(Report_HashrateBateToGB))

Ethtobusd =(float(ethprice) * balance_eth / 1e+9)

ethamout = (balance_eth / 1e+9)

    

CMD = input("Enter Commend:")

if CMD == "EthBank" or "ethbank" or "eb":
    print("Balance (ETH) " + ("{:.3f}".format(ethamout)) + " Eth")
    print("Balance (USD) " + ("{:.2f}".format(Ethtobusd)) + "$")
    print("Ethereum Price Now " +("{:.2f}".format(float(ethprice))) + "$")


if CMD == "Full_Hashrate" or "fullhash" or "fhash" or "fh":
    print("Reported Hashrate " + Report_HashrateBateToGB_Fix + " GB/s")