api文档只给了买入指定数量的写法。 def main(): id = exchange.Buy(100, 1) Log(“id:”, id) 请教python全仓买入和全仓卖出怎么写?
bense exchange.Buy("梭哈")
小草 可用余额/价格
ktrader buyPrice = _N(ticker.Sell + spread, ZPrecision) buyAmount = _N(diffAsset / buyPrice, XPrecision) if buyAmount < MinStock: return False exchange.Buy(buyPrice, buyAmount)