资源加载中... loading...

python全仓买入和全仓卖出怎么写?

Author: 风前唯两人, Created: 2021-04-27 16:51:55, Updated:

api文档只给了买入指定数量的写法。 def main(): id = exchange.Buy(100, 1) Log(“id:”, id) 请教python全仓买入和全仓卖出怎么写?


More

bense exchange.Buy("梭哈")

小草 可用余额/价格

ktrader buyPrice = _N(ticker.Sell + spread, ZPrecision) buyAmount = _N(diffAsset / buyPrice, XPrecision) if buyAmount < MinStock: return False exchange.Buy(buyPrice, buyAmount)