From ab3371e39c950249204780cda4d887fdc3e4ca99 Mon Sep 17 00:00:00 2001 From: Abel Armoa <30988000+aarmoa@users.noreply.github.com> Date: Tue, 30 Jul 2024 12:23:34 -0300 Subject: [PATCH] (feat) Added the method in Composer, to allow order cancellation just using the order's identifiers --- pyinjective/composer.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pyinjective/composer.py b/pyinjective/composer.py index 6937ef74..e5f031e1 100644 --- a/pyinjective/composer.py +++ b/pyinjective/composer.py @@ -211,6 +211,21 @@ def order_data( cid=cid, ) + def order_data_without_mask( + self, + market_id: str, + subaccount_id: str, + order_hash: Optional[str] = None, + cid: Optional[str] = None, + ) -> injective_exchange_tx_pb.OrderData: + return injective_exchange_tx_pb.OrderData( + market_id=market_id, + subaccount_id=subaccount_id, + order_hash=order_hash, + order_mask=1, + cid=cid, + ) + def SpotOrder( self, market_id: str,