removed inactive commands

This commit is contained in:
Nicolás Sánchez 2025-02-24 11:35:01 -03:00
parent e1f60445a2
commit ea5f40094a
1 changed files with 8 additions and 28 deletions

View File

@ -36,7 +36,7 @@ INSTANCE
7) mod_global_tp_level 8) global_last_call 9) edit_loop_wait_time 7) mod_global_tp_level 8) global_last_call 9) edit_loop_wait_time
10) edit_call_wait_time 11) reload_markets 12) fetch_full_log 10) edit_call_wait_time 11) reload_markets 12) fetch_full_log
13) paused_traders 14) fetch_log 15) edit_cooldown_multiplier 13) paused_traders 14) fetch_log 15) edit_cooldown_multiplier
16) backtests 17) get_balance 16) get_balance
EARN EARN
31) toggle_pause 32) get_step_size 33) set_step_size 31) toggle_pause 32) get_step_size 33) set_step_size
@ -90,12 +90,13 @@ def select_exchange(exchanges):
Selects the exchange to use Selects the exchange to use
''' '''
selection = input("Enter exchange: (Binance, Gate.io, KuCoin, OKX) ").lower() while True:
for item in exchanges: selection = input("Enter exchange: (Binance, Gate.io, KuCoin, OKX) ").lower()
if selection in item.lower(): for item in exchanges:
return item if selection in item.lower():
print("Invalid input") return item
sys.exit() print("Invalid input")
if __name__=="__main__": if __name__=="__main__":
@ -298,27 +299,6 @@ if __name__=="__main__":
print(json.loads(requests.post(url, headers=headers, json=parameters).content)) print(json.loads(requests.post(url, headers=headers, json=parameters).content))
input("Press ENTER to continue ") input("Press ENTER to continue ")
elif command==16:
print("Returns backtests of the pairs available in an exchange")
broker = input("Exchange? (binance, gateio, kucoin, okx or bybit): ")
amount = input("Amount of days to consider? ")
max_rank = input("Maximum CoinMarketCap rank? ")
if not validate_int(amount):
print("The amount of days specified is invalid")
break
if not validate_int(max_rank):
print("The max_rank specified is invalid")
break
if input("Proceed? (Y/n) ") in ["Y","y",""]:
url = f"{base_url}/statistics_server/fetch_backtests?exchange_name={broker}&days={amount}&max_rank={max_rank}"
result = json.loads(requests.get(url,headers=headers).content)
#for item in result:
# print(item, round(result[item],2))
sorted_result = {key: value for key, value in sorted(result.items(),key=lambda item: item[1])}
for item in sorted_result:
print(item, round(sorted_result[item],2))
input("Press ENTER to continue ")
elif command==17: elif command==17:
print("Returns the free balance of a given coin") print("Returns the free balance of a given coin")
coin = input("Input currency: ").upper() coin = input("Input currency: ").upper()