Skip to content

Commit 1044235

Browse files
committed
feat: add multi subaccount-market support in Trades
1 parent ac610b5 commit 1044235

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pyinjective/async_client.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -588,10 +588,12 @@ async def get_spot_orders(self, market_id: str, **kwargs):
588588

589589
async def get_spot_trades(self, market_id: str, **kwargs):
590590
req = spot_exchange_rpc_pb.TradesRequest(
591-
market_id=market_id,
591+
market_id=kwargs.get("market_id"),
592+
market_ids=kwargs.get("market_ids"),
592593
execution_side=kwargs.get("execution_side"),
593594
direction=kwargs.get("direction"),
594595
subaccount_id=kwargs.get("subaccount_id"),
596+
subaccount_ids=kwargs.get("subaccount_ids"),
595597
skip=kwargs.get("skip"),
596598
limit=kwargs.get("limit"),
597599
)
@@ -688,8 +690,10 @@ async def get_derivative_orders(self, market_id: str, **kwargs):
688690

689691
async def get_derivative_trades(self, market_id: str, **kwargs):
690692
req = derivative_exchange_rpc_pb.TradesRequest(
691-
market_id=market_id,
693+
market_id=kwargs.get("market_id"),
694+
market_ids=kwargs.get("market_ids"),
692695
subaccount_id=kwargs.get("subaccount_id"),
696+
subaccount_ids=kwargs.get("subaccount_ids"),
693697
execution_side=kwargs.get("execution_side"),
694698
direction=kwargs.get("direction"),
695699
skip=kwargs.get("skip"),

0 commit comments

Comments
 (0)