RAPTOR v18.4: Исправлена отчетность, активированы выходные
This commit is contained in:
18
invest-python-master/examples/porfolio_stream_client.py
Normal file
18
invest-python-master/examples/porfolio_stream_client.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import os
|
||||
|
||||
from t_tech.invest import Client
|
||||
|
||||
TOKEN = os.environ["INVEST_TOKEN"]
|
||||
|
||||
|
||||
def main():
|
||||
with Client(TOKEN) as client:
|
||||
accounts = client.users.get_accounts()
|
||||
for portfolio in client.operations_stream.portfolio_stream(
|
||||
accounts=[acc.id for acc in accounts.accounts], ping_delay_ms=60_000
|
||||
):
|
||||
print(portfolio)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user