RAPTOR v18.4: Исправлена отчетность, активированы выходные
This commit is contained in:
19
invest-python-master/examples/positions_stream.py
Normal file
19
invest-python-master/examples/positions_stream.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import os
|
||||
|
||||
from t_tech.invest import Client
|
||||
|
||||
TOKEN = os.environ["INVEST_TOKEN"]
|
||||
|
||||
|
||||
def main():
|
||||
with Client(TOKEN) as client:
|
||||
response = client.users.get_accounts()
|
||||
accounts = [account.id for account in response.accounts]
|
||||
for response in client.operations_stream.positions_stream(
|
||||
accounts=accounts, with_initial_positions=True
|
||||
): # noqa:E501 # pylint:disable=line-too-long
|
||||
print(response)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user