mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
fix types.NewZeroAssetError panic error
This commit is contained in:
parent
98f70756be
commit
50d5449b9a
|
@ -286,7 +286,7 @@ func (e *GeneralOrderExecutor) reduceQuantityAndSubmitOrder(ctx context.Context,
|
||||||
|
|
||||||
submitOrder.Quantity = q
|
submitOrder.Quantity = q
|
||||||
if e.position.Market.IsDustQuantity(submitOrder.Quantity, price) {
|
if e.position.Market.IsDustQuantity(submitOrder.Quantity, price) {
|
||||||
return nil, types.NewZeroAssetError(nil)
|
return nil, types.NewZeroAssetError(fmt.Errorf("dust quantity"))
|
||||||
}
|
}
|
||||||
|
|
||||||
createdOrder, err2 := e.SubmitOrders(ctx, submitOrder)
|
createdOrder, err2 := e.SubmitOrders(ctx, submitOrder)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user