Closed danywayGit closed 1 month ago
I have testing the function, like this:
def modify_take_profit_order_oneway_mode(symbol: str, orderId: int, side: str, quantity: float, price: float)-> dict: price = round(float(price),get_price_precision_futures(symbol)) price = round_step_size(float(price), get_tick_size_futures(symbol)) try: order = client.futures_modify_order( symbol=symbol, orderId=orderId, side=side, quantity=quantity, price=price, timeInForce='GTC' ) return order except Exception as e: log_to_file("ERROR modify_take_profit_order_oneway_mode : " + type(e).name, symbol) log_to_file("ERROR modify_take_profit_order_oneway_mode : " + str(e), symbol)
Thanks @danywayGit
Simple but missing function, to be able to modify an existing order. For example it is usefull for modifing the quantity, or the price of an open order.
Using the same url (order) as for creating a new order but with a PUT method instead of a POST method.