QMT Python API
流通值
流通值
1
# coding:gbk2
'''3
内置python, 流通值4
'''5
6
def init(C): 7
stock = "${stock_code}.${market}" # 股票代码8
floatVol = C.get_instrumentdetail(stock)["FloatVolumn"]9
lastPrice = C.get_full_tick([stock])[stock]['lastPrice']10
floatAmount = floatVol * lastPrice11
print(f'{stock}的流通值是{floatAmount}')12
return 13
14
def handlebar(C):15
return