reshuffling
This commit is contained in:
parent
90dc1b1a43
commit
03d12d33d9
|
|
@ -33,6 +33,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
|
||||||
|
|
||||||
TRADERS
|
TRADERS
|
||||||
51) worker_status 52) get_all_worker_status
|
51) worker_status 52) get_all_worker_status
|
||||||
|
|
@ -43,7 +44,6 @@ TRADERS
|
||||||
65) toggle_pause 66) toggle_cleanup 67) toggle_autoswitch
|
65) toggle_pause 66) toggle_cleanup 67) toggle_autoswitch
|
||||||
68) toggle_check_old_long_price 69) switch_quote_currency
|
68) toggle_check_old_long_price 69) switch_quote_currency
|
||||||
70) reload_safety_order 71) view_old_long 72) switch_price
|
70) reload_safety_order 71) view_old_long 72) switch_price
|
||||||
73) backtests 74) get_balance
|
|
||||||
|
|
||||||
98) Change broker 99) Exit
|
98) Change broker 99) Exit
|
||||||
'''
|
'''
|
||||||
|
|
@ -277,7 +277,36 @@ if __name__=="__main__":
|
||||||
url = f"{base_url}{port}/edit_cooldown_multiplier"
|
url = f"{base_url}{port}/edit_cooldown_multiplier"
|
||||||
parameters = {"cooldown_multiplier": new_multiplier}
|
parameters = {"cooldown_multiplier": new_multiplier}
|
||||||
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 ")
|
||||||
|
|
||||||
|
elif command==16:
|
||||||
|
print("Returns backtests of the pairs available in an exchange")
|
||||||
|
broker = input("Exchange? (binance, gateio, kucoin or okx): ")
|
||||||
|
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, sorted_result[item])
|
||||||
input("Press ENTER to continue ")
|
input("Press ENTER to continue ")
|
||||||
|
|
||||||
|
elif command==17:
|
||||||
|
print("Returns the free balance of a given coin")
|
||||||
|
coin = input("Input currency: ").upper()
|
||||||
|
if input("Proceed? (Y/n) ") in ["Y","y",""]:
|
||||||
|
url = f"{base_url}{port}/get_balance?coin={coin}"
|
||||||
|
print(json.loads(requests.get(url,headers=headers).content))
|
||||||
|
input("Press ENTER to continue ")
|
||||||
|
|
||||||
######################
|
######################
|
||||||
####### TRADER #######
|
####### TRADER #######
|
||||||
|
|
@ -616,32 +645,4 @@ if __name__=="__main__":
|
||||||
url = f"{base_url}{port}/switch_to_long_price?base={base}"e={quote}"
|
url = f"{base_url}{port}/switch_to_long_price?base={base}"e={quote}"
|
||||||
print(json.loads(requests.get(url,headers=headers).content))
|
print(json.loads(requests.get(url,headers=headers).content))
|
||||||
input("Press ENTER to continue ")
|
input("Press ENTER to continue ")
|
||||||
|
|
||||||
elif command==73:
|
|
||||||
print("Returns backtests of the pairs available in an exchange")
|
|
||||||
broker = input("Exchange? (binance, gateio, kucoin or okx): ")
|
|
||||||
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, sorted_result[item])
|
|
||||||
input("Press ENTER to continue ")
|
|
||||||
|
|
||||||
elif command==74:
|
|
||||||
print("Returns the free balance of a given coin")
|
|
||||||
coin = input("Input currency: ").upper()
|
|
||||||
if input("Proceed? (Y/n) ") in ["Y","y",""]:
|
|
||||||
url = f"{base_url}{port}/get_balance?coin={coin}"
|
|
||||||
print(json.loads(requests.get(url,headers=headers).content))
|
|
||||||
input("Press ENTER to continue ")
|
|
||||||
Loading…
Reference in New Issue