We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cba7505 commit a403d6eCopy full SHA for a403d6e
…ient/portfolio_rpc/1_accountPortfolio.py …ient/portfolio_rpc/1_AccountPortfolio.pyexamples/exchange_client/portfolio_rpc/1_accountPortfolio.py renamed to examples/exchange_client/portfolio_rpc/1_AccountPortfolio.py
examples/exchange_client/portfolio_rpc/2_StreamAccountPortfolio.py
@@ -0,0 +1,20 @@
1
+import asyncio
2
+import logging
3
+
4
+from pyinjective.async_client import AsyncClient
5
+from pyinjective.constant import Network
6
7
8
+async def main() -> None:
9
+ network = Network.testnet()
10
+ client = AsyncClient(network, insecure=False)
11
+ account_address = "inj1clw20s2uxeyxtam6f7m84vgae92s9eh7vygagt"
12
+ updates = await client.stream_account_portfolio(account_address=account_address)
13
+ async for update in updates:
14
+ print("Account portfolio Update:\n")
15
+ print(update)
16
17
18
+if __name__ == '__main__':
19
+ logging.basicConfig(level=logging.INFO)
20
+ asyncio.get_event_loop().run_until_complete(main())
0 commit comments