From 08ce7c65a0bfb2b6c8de79f963c039999850ea42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20S=C3=A1nchez?= Date: Sat, 6 Sep 2025 11:28:40 -0300 Subject: [PATCH] added support for mod_order_size --- utils/commander.py | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/utils/commander.py b/utils/commander.py index c086531..c94e0ad 100644 --- a/utils/commander.py +++ b/utils/commander.py @@ -65,6 +65,7 @@ TRADERS 70) view_old_long 71) switch_price 72) reload_trader_config 73) toggle_liquidate_after_switch 74) base_add_calculation 75) mod_concurrent_safety_orders 76) force_trader_close +77) mod_order_size 98) Change broker 99) Exit ''' @@ -894,4 +895,24 @@ if __name__=="__main__": parameters = {"base": base, "quote": quote} print(json.loads(requests.post(url, headers=headers, json=parameters).content)) - input("Press ENTER to continue ") \ No newline at end of file + input("Press ENTER to continue ") + + elif command==77: + print("mod_order_size modifies the initial order size of a trader") + print("The change impacts as soon as the trader starts a new deal") + trading_pair = input("Input trader in the format BASE/QUOTE: ").upper() + amount = input("Desired order size: ") + if not validate_pair(trading_pair): + print("The input is invalid") + break + if not validate_float_or_int(amount): + print("The amount entered is invalid") + break + if input("Proceed? (Y/n) ") in ["Y","y",""]: + url = f"{base_url}{port}/mod_order_size" + base,quote = trading_pair.split("/") + parameters = {"base": base, + "quote": quote, + "amount": amount} + print(json.loads(requests.post(url, headers=headers, json=parameters).content)) + input("Press ENTER to continue ") \ No newline at end of file