RAPTOR v18.4: Исправлена отчетность, активированы выходные
This commit is contained in:
27
invest-python-master/examples/get_market_values.py
Normal file
27
invest-python-master/examples/get_market_values.py
Normal file
@@ -0,0 +1,27 @@
|
||||
import os
|
||||
|
||||
from t_tech.invest import Client
|
||||
from t_tech.invest.schemas import GetMarketValuesRequest, MarketValueType
|
||||
|
||||
TOKEN = os.environ["INVEST_TOKEN"]
|
||||
|
||||
|
||||
def main():
|
||||
with Client(TOKEN) as client:
|
||||
for values in client.market_data.get_market_values(
|
||||
request=GetMarketValuesRequest(
|
||||
instrument_id=["BBG004730N88"],
|
||||
values=[
|
||||
MarketValueType.INSTRUMENT_VALUE_LAST_PRICE,
|
||||
MarketValueType.INSTRUMENT_VALUE_CLOSE_PRICE,
|
||||
],
|
||||
)
|
||||
).instruments:
|
||||
for value in values.values:
|
||||
print(value)
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user