Skip to content

Commit 5f0b976

Browse files
committed
feat(exchange): use kargs for stream_account_portfolio.
1 parent a403d6e commit 5f0b976

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

pyinjective/async_client.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -992,13 +992,11 @@ async def get_account_portfolio(self, account_address: str):
992992
req = portfolio_rpc_pb.AccountPortfolioRequest(account_address=account_address)
993993
return await self.stubPortfolio.AccountPortfolio(req)
994994

995-
async def stream_account_portfolio(
996-
self, account_address: str = None, subaccount_id: str = None, portfolio_type: str = None
997-
):
995+
async def stream_account_portfolio(self, account_address: str, **kwargs):
998996
req = portfolio_rpc_pb.StreamAccountPortfolioRequest(
999997
account_address=account_address,
1000-
subaccount_id=subaccount_id,
1001-
type=portfolio_type
998+
subaccount_id=kwargs.get("subaccount_id"),
999+
type=kwargs.get("type")
10021000
)
10031001
metadata = await self.load_cookie(type="exchange")
10041002
return self.stubPortfolio.StreamAccountPortfolio.__call__(req, metadata=metadata)

0 commit comments

Comments
 (0)