RAPTOR v18.4: Исправлена отчетность, активированы выходные
This commit is contained in:
22
invest-python-master/examples/async_get_sandbox_max_lots.py
Normal file
22
invest-python-master/examples/async_get_sandbox_max_lots.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import asyncio
|
||||
import os
|
||||
|
||||
from t_tech.invest import GetMaxLotsRequest
|
||||
from t_tech.invest.sandbox.async_client import AsyncSandboxClient
|
||||
from t_tech.invest.sandbox.client import SandboxClient
|
||||
|
||||
TOKEN = os.environ["INVEST_SANDBOX_TOKEN"]
|
||||
|
||||
|
||||
async def main():
|
||||
async with AsyncSandboxClient(TOKEN) as client:
|
||||
account_id = (await client.users.get_accounts()).accounts[0].id
|
||||
request = GetMaxLotsRequest(
|
||||
account_id=account_id,
|
||||
instrument_id="BBG004730N88",
|
||||
)
|
||||
print(await client.sandbox.get_sandbox_max_lots(request=request))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(main())
|
||||
Reference in New Issue
Block a user