Compare commits
No commits in common. "main" and "2025.10.11" have entirely different histories.
main
...
2025.10.11
|
|
@ -251,7 +251,7 @@ class earner:
|
|||
earning_delta = target_earning_amount - Decimal(self.earning_balance)
|
||||
if earning_delta>Decimal(self.step_size) and time.time()-self.last_subscription_time>self.time_between_subscriptions:
|
||||
self.subscribe(earning_delta)
|
||||
elif earning_delta<-Decimal(self.step_size) and time.time()-self.last_redemption_time>self.time_between_redemptions:
|
||||
if earning_delta<-Decimal(self.step_size) and time.time()-self.last_redemption_time>self.time_between_redemptions:
|
||||
self.redeem(-earning_delta)
|
||||
#print(f"{str(self.connector)} - Difference: {earning_delta}")
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ class okx_earn:
|
|||
"amount": response["data"][0]["amt"]
|
||||
}
|
||||
else:
|
||||
return {"Error": response, "Rate": str(rate)}
|
||||
return {"Error": response}
|
||||
|
||||
|
||||
def redeem_product(self, coin, amount):
|
||||
|
|
@ -207,8 +207,6 @@ class okx_earn:
|
|||
Returns the 24hs average lending rate
|
||||
'''
|
||||
rate = self.earning_api.get_public_borrow_info(coin)
|
||||
if rate["data"][0]["avgRate"]=='0':
|
||||
return str(rate["data"][0]["estRate"])
|
||||
return str(rate["data"][0]["avgRate"])
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue