34 lines
976 B
Python
34 lines
976 B
Python
from libraries.wrappers import earn_binance
|
|
from libraries.wrappers import earn_okx
|
|
from libraries.wrappers import earn_gateio
|
|
from libraries.balance_accounts import balance_accounts
|
|
from decimal import Decimal
|
|
|
|
binance = earn_binance.binance_earn()
|
|
gateio = earn_gateio.gateio_earn()
|
|
okx = earn_okx.okx_earn()
|
|
|
|
total_profits = []
|
|
print("Profits OKX:")
|
|
total_rewards = Decimal(0)
|
|
rewards = okx.get_lending_history("USDT")
|
|
for item in rewards["data"]:
|
|
total_rewards += Decimal(item["earnings"])
|
|
print(total_rewards)
|
|
total_profits.append(total_rewards)
|
|
|
|
print("Profits Gate.io:")
|
|
total_rewards = gateio.get_rewards_history("USDT")["interest"]
|
|
print(total_rewards)
|
|
total_profits.append(Decimal(total_rewards))
|
|
|
|
print("Profits Binance:")
|
|
total_rewards = Decimal(0)
|
|
rewards = binance.get_rewards_history()
|
|
for item in rewards["rows"]:
|
|
total_rewards += Decimal(item["rewards"])
|
|
print(total_rewards)
|
|
total_profits.append(total_rewards)
|
|
|
|
print(f"Total: {sum(total_profits)}")
|