error handling
This commit is contained in:
parent
574d8f82ef
commit
ad1adeff0a
|
|
@ -114,11 +114,18 @@ class earner:
|
|||
return self.status_string
|
||||
|
||||
def get_trading_balance(self):
|
||||
try:
|
||||
return float(self.trading_balance)
|
||||
except Exception as e:
|
||||
self.write_to_log(f"{e}")
|
||||
return 0.0
|
||||
|
||||
def get_earning_balance(self):
|
||||
try:
|
||||
return float(self.earning_balance)
|
||||
|
||||
except Exception as e:
|
||||
self.write_to_log(f"{e}")
|
||||
return 0.0
|
||||
|
||||
def subscribe(self,amount,force_pause=False):
|
||||
print(f"{datetime.datetime.now().strftime('[%Y/%m/%d %H:%M:%S]')} | {str(self.connector).upper()} | {colors.green}Subscribing{colors.white} {amount} {self.currency}")
|
||||
|
|
|
|||
Loading…
Reference in New Issue