global_status now includes currency
This commit is contained in:
parent
866a130c35
commit
17a5081f8a
|
|
@ -32,6 +32,9 @@ class earner:
|
|||
|
||||
def __str__(self):
|
||||
return str(self.connector)
|
||||
|
||||
def get_currency(self):
|
||||
return self.currency
|
||||
|
||||
def write_to_log(self,message):
|
||||
with open("earn.log", "a") as f:
|
||||
|
|
|
|||
5
main.py
5
main.py
|
|
@ -129,7 +129,8 @@ def get_global_status():
|
|||
if "X-API-KEY" in request.headers and request.headers.get("X-API-KEY") in valid_keys:
|
||||
response = {}
|
||||
for item in earners:
|
||||
response[str(item.connector)] = {"trading_balance": item.get_trading_balance(),
|
||||
response[str(item.connector)] = {"currency": item.get_currency(),
|
||||
"trading_balance": item.get_trading_balance(),
|
||||
"earning_balance": item.get_earning_balance(),
|
||||
"is_paused": item.get_is_paused(),
|
||||
"step_size": item.get_step_size(),
|
||||
|
|
@ -480,7 +481,7 @@ def run_API(port):
|
|||
|
||||
if __name__=="__main__":
|
||||
|
||||
version = "2025.03.10"
|
||||
version = "2025.03.13"
|
||||
start_time = time.time()
|
||||
|
||||
with open("config.json") as f:
|
||||
|
|
|
|||
Loading…
Reference in New Issue