RAPTOR v18.4: Исправлена отчетность, активированы выходные
This commit is contained in:
19
invest-python-master/examples/async_get_strategies.py
Normal file
19
invest-python-master/examples/async_get_strategies.py
Normal file
@@ -0,0 +1,19 @@
|
||||
"""Example - How to get all strategies"""
|
||||
import asyncio
|
||||
import os
|
||||
|
||||
from t_tech.invest import AsyncClient
|
||||
from t_tech.invest.schemas import GetStrategiesRequest
|
||||
|
||||
TOKEN = os.environ["INVEST_TOKEN"]
|
||||
|
||||
|
||||
async def main():
|
||||
async with AsyncClient(TOKEN) as client:
|
||||
r = await client.signals.get_strategies(request=GetStrategiesRequest())
|
||||
for strategy in r.strategies:
|
||||
print(strategy)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(main())
|
||||
Reference in New Issue
Block a user