Skip to content

Commit 7b19195

Browse files
authored
Merge branch 'rundef:main' into main
2 parents b26bae0 + 19ca2de commit 7b19195

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

async_rithmic/plants/order.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import asyncio
22

33
from .base import BasePlant
4-
from ..enums import OrderType, OrderDuration, TransactionType
4+
from ..enums import OrderType, OrderDuration, OrderPlacement, TransactionType
55
from ..exceptions import InvalidRequestError
66
from .. import protocol_buffers as pb
77

@@ -270,7 +270,7 @@ async def submit_order(
270270
exchange=exchange,
271271
price_type=order_type,
272272
quantity=qty,
273-
manual_or_auto=pb.request_new_order_pb2.RequestNewOrder.OrderPlacement.MANUAL,
273+
manual_or_auto=OrderPlacement.MANUAL,
274274
transaction_type=transaction_type,
275275
duration=kwargs["duration"],
276276
fcm_id=self.login_info["fcm_id"],
@@ -297,7 +297,7 @@ async def cancel_order(self, **kwargs):
297297
return await self._send_and_collect(
298298
template_id=316,
299299
expected_response=dict(template_id=317),
300-
manual_or_auto=pb.request_new_order_pb2.RequestNewOrder.OrderPlacement.MANUAL,
300+
manual_or_auto=OrderPlacement.MANUAL,
301301
basket_id=basket_id,
302302
account_id=account_id,
303303
fcm_id=self.login_info["fcm_id"],
@@ -311,7 +311,7 @@ async def cancel_all_orders(self, **kwargs):
311311
return await self._send_and_collect(
312312
template_id=346,
313313
expected_response=dict(template_id=347),
314-
manual_or_auto=pb.request_new_order_pb2.RequestNewOrder.OrderPlacement.MANUAL,
314+
manual_or_auto=OrderPlacement.MANUAL,
315315
user_type=self.login_info["user_type"],
316316
account_id=self._get_account_id(**kwargs)
317317
)
@@ -376,7 +376,7 @@ async def modify_order(self, **kwargs):
376376
return await self._send_and_collect(
377377
template_id=314,
378378
expected_response=dict(template_id=315),
379-
manual_or_auto=pb.request_new_order_pb2.RequestNewOrder.OrderPlacement.MANUAL,
379+
manual_or_auto=OrderPlacement.MANUAL,
380380
account_id=order.account_id,
381381
basket_id=order.basket_id,
382382
symbol=order.symbol,
@@ -420,7 +420,7 @@ async def exit_position(self, **kwargs):
420420
return await self._send_and_collect(
421421
template_id=3504,
422422
expected_response=dict(template_id=3505),
423-
manual_or_auto=pb.request_new_order_pb2.RequestNewOrder.OrderPlacement.MANUAL,
423+
manual_or_auto=OrderPlacement.MANUAL,
424424
**kwargs
425425
)
426426

0 commit comments

Comments
 (0)