added support for mod_order_size
This commit is contained in:
parent
61a3545dd7
commit
08ce7c65a0
|
|
@ -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 ")
|
||||
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 ")
|
||||
Loading…
Reference in New Issue