RAPTOR v18.4: Исправлена отчетность, активированы выходные
This commit is contained in:
20
invest-python-master/examples/instruments/async_get_bonds.py
Normal file
20
invest-python-master/examples/instruments/async_get_bonds.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import asyncio
|
||||
import os
|
||||
|
||||
from t_tech.invest import AsyncClient
|
||||
from t_tech.invest.schemas import InstrumentExchangeType
|
||||
|
||||
TOKEN = os.environ["INVEST_TOKEN"]
|
||||
|
||||
|
||||
async def main():
|
||||
async with AsyncClient(TOKEN) as client:
|
||||
bonds = await client.instruments.bonds(
|
||||
instrument_exchange=InstrumentExchangeType.INSTRUMENT_EXCHANGE_UNSPECIFIED,
|
||||
)
|
||||
for bond in bonds.instruments:
|
||||
print(bond)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(main())
|
||||
Reference in New Issue
Block a user