mirror of
https://github.com/c9s/bbgo.git
synced 2024-09-20 08:11:08 +00:00
liquiditymaker: skip dust quantity
This commit is contained in:
parent
e6ce215979
commit
34200efd54
|
@ -81,12 +81,17 @@ func (g *LiquidityOrderGenerator) Generate(
|
|||
price := layerPrices[i]
|
||||
s := layerScales[i]
|
||||
|
||||
quantity := factor * s
|
||||
quantity := g.Market.TruncateQuantity(fixedpoint.NewFromFloat(factor * s))
|
||||
|
||||
if g.Market.IsDustQuantity(quantity, price) {
|
||||
continue
|
||||
}
|
||||
|
||||
orders = append(orders, types.SubmitOrder{
|
||||
Symbol: g.Symbol,
|
||||
Price: price,
|
||||
Type: types.OrderTypeLimitMaker,
|
||||
Quantity: g.Market.TruncateQuantity(fixedpoint.NewFromFloat(quantity)),
|
||||
Quantity: quantity,
|
||||
Side: side,
|
||||
Market: g.Market,
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue
Block a user