@@ -254,6 +254,8 @@ async def submit_order(
254254 msg_kwargs ["cancel_at_ssboe" ] = ssboe
255255 msg_kwargs ["cancel_at_usecs" ] = usecs
256256
257+ manual_or_auto = kwargs .get ("manual_or_auto" , self .client .manual_or_auto )
258+
257259 return await self ._send_and_collect (
258260 template_id = template_id ,
259261 expected_response = dict (template_id = template_id + 1 ),
@@ -262,7 +264,7 @@ async def submit_order(
262264 exchange = exchange ,
263265 price_type = order_type ,
264266 quantity = qty ,
265- manual_or_auto = OrderPlacement . MANUAL ,
267+ manual_or_auto = manual_or_auto ,
266268 transaction_type = transaction_type ,
267269 duration = kwargs ["duration" ],
268270 ** msg_kwargs
@@ -284,10 +286,12 @@ async def cancel_order(self, **kwargs):
284286 basket_id = order .basket_id
285287 account_id = order .account_id
286288
289+ manual_or_auto = kwargs .get ("manual_or_auto" , self .client .manual_or_auto )
290+
287291 return await self ._send_and_collect (
288292 template_id = 316 ,
289293 expected_response = dict (template_id = 317 ),
290- manual_or_auto = OrderPlacement . MANUAL ,
294+ manual_or_auto = manual_or_auto ,
291295 basket_id = basket_id ,
292296 account_id = account_id ,
293297 )
@@ -296,10 +300,12 @@ async def cancel_all_orders(self, **kwargs):
296300 """
297301 Cancel all orders
298302 """
303+ manual_or_auto = kwargs .get ("manual_or_auto" , self .client .manual_or_auto )
304+
299305 return await self ._send_and_collect (
300306 template_id = 346 ,
301307 expected_response = dict (template_id = 347 ),
302- manual_or_auto = OrderPlacement . MANUAL ,
308+ manual_or_auto = manual_or_auto ,
303309 account_id = self ._get_account_id (** kwargs )
304310 )
305311
@@ -360,10 +366,13 @@ async def modify_order(self, **kwargs):
360366
361367 # Update the actual order
362368 msg_kwargs = self ._validate_price_fields (order_type , raise_exception = False , ** kwargs )
369+
370+ manual_or_auto = kwargs .get ("manual_or_auto" , self .client .manual_or_auto )
371+
363372 return await self ._send_and_collect (
364373 template_id = 314 ,
365374 expected_response = dict (template_id = 315 ),
366- manual_or_auto = OrderPlacement . MANUAL ,
375+ manual_or_auto = manual_or_auto ,
367376 account_id = order .account_id ,
368377 basket_id = order .basket_id ,
369378 symbol = order .symbol ,
@@ -404,10 +413,12 @@ async def exit_position(self, **kwargs):
404413 You can pass `symbol` and `exchange` to target a specific position, otherwise all the account positions will
405414 be exited.
406415 """
416+ manual_or_auto = kwargs .get ("manual_or_auto" , self .client .manual_or_auto )
417+
407418 return await self ._send_and_collect (
408419 template_id = 3504 ,
409420 expected_response = dict (template_id = 3505 ),
410- manual_or_auto = OrderPlacement . MANUAL ,
421+ manual_or_auto = manual_or_auto ,
411422 ** kwargs
412423 )
413424
0 commit comments