Skip to content

Commit 9f57c29

Browse files
Add MsgBatchUpdateOrders (#57)
* add MsgBatchUpdateOrders to the composer add MsgBatchUpdateOrders to the composer * Update changelogs and bump version Update changelogs and bump version
1 parent 10eb4b7 commit 9f57c29

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ python pyinjective/fetch_metadata.py
8686

8787

8888
### Changelogs
89+
0.5.5.9
90+
* add MsgBatchUpdateOrders to the composer
91+
8992
0.5.5.8
9093
* fix stream_bids in async client
9194
* add more messages in MsgResponses for simulation

pyinjective/composer.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,22 @@ def MsgBatchCancelDerivativeOrders(
280280
sender=sender,
281281
data=data
282282
)
283+
284+
def MsgBatchUpdateOrders(
285+
self,
286+
sender: str,
287+
**kwargs
288+
):
289+
return injective_exchange_tx_pb.MsgBatchUpdateOrders(
290+
sender=sender,
291+
subaccount_id=kwargs.get('subaccount_id'),
292+
spot_market_ids_to_cancel_all=kwargs.get('spot_market_ids_to_cancel_all'),
293+
derivative_market_ids_to_cancel_all=kwargs.get('derivative_market_ids_to_cancel_all'),
294+
spot_orders_to_cancel=kwargs.get('spot_orders_to_cancel'),
295+
derivative_orders_to_cancel=kwargs.get('derivative_orders_to_cancel'),
296+
spot_orders_to_create=kwargs.get('spot_orders_to_create'),
297+
derivative_orders_to_create=kwargs.get('derivative_orders_to_create')
298+
)
283299

284300
def MsgLiquidatePosition(
285301
self,
@@ -377,6 +393,7 @@ def MsgResponses(data, simulation=False):
377393
"/injective.exchange.v1beta1.MsgBatchCancelDerivativeOrders": injective_exchange_tx_pb.MsgBatchCancelDerivativeOrdersResponse,
378394
"/injective.exchange.v1beta1.MsgBatchCreateSpotLimitOrders": injective_exchange_tx_pb.MsgBatchCreateSpotLimitOrdersResponse,
379395
"/injective.exchange.v1beta1.MsgBatchCreateDerivativeLimitOrders": injective_exchange_tx_pb.MsgBatchCreateDerivativeLimitOrdersResponse,
396+
"/injective.exchange.v1beta1.MsgBatchUpdateOrders": injective_exchange_tx_pb.MsgBatchUpdateOrdersResponse,
380397
"/injective.exchange.v1beta1.MsgDeposit": injective_exchange_tx_pb.MsgDepositResponse,
381398
"/injective.exchange.v1beta1.MsgWithdraw": injective_exchange_tx_pb.MsgWithdrawResponse,
382399
"/injective.exchange.v1beta1.MsgSubaccountTransfer": injective_exchange_tx_pb.MsgSubaccountTransferResponse,

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
1818
AUTHOR = "Injective Labs"
1919
REQUIRES_PYTHON = ">=3.7.0"
20-
VERSION = "0.5.5.8"
20+
VERSION = "0.5.5.9"
2121

2222
REQUIRED = [
2323
"grpcio",

0 commit comments

Comments
 (0)