报错:
print(quote.last_price)
AttributeError: ‘dict’ object has no attribute ‘last_price’
照着下面示例写的.只改了当月品种.但如果把last_price去掉会读出整个所有字段的数据.但单独打某一个不成功
from tqsdk import TqApi, TqSim
import datetime
api = TqApi(TqSim())
quote = api.get_quote(“SHFE.ag2006”)
while True:
api.wait_update()
if api.is_changing(quote, “last_price”):
print(quote.last_price)