def request_iterator():
yield MarketDataRequest(
subscribe_trades_request=SubscribeTradesRequest(
subscription_action=SubscriptionAction.SUBSCRIPTION_ACTION_SUBSCRIBE,
instruments=[
TradeInstrument(
figi="BBG004730N88"
)
],
)
)
while True:
time.sleep(.1)
with Client(TOKEN) as client:
for marketdata in client.market_data_stream.market_data_stream(
request_iterator()
):
print(marketdata.trade.figi)
Tinkoff Invest Version
0.2.0-beta52
Python Version
3.9
OS
Windows
Логи
Traceback (most recent call last):
File "c:\Users\Anonymous\Desktop\Trading_bot\get_figi.py", line 111, in <module>
stream_stakan()
File "c:\Users\Anonymous\Desktop\Trading_bot\get_figi.py", line 89, in stream_stakan
print(marketdata.trade.figi)
AttributeError: 'NoneType' object has no attribute 'figi'
Что случилось?
Не могу понять, что делаю не так (
Воспроизведение
Tinkoff Invest Version
0.2.0-beta52
Python Version
3.9
OS
Windows
Логи