mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
increase min amount if it's not greater than min notional
This commit is contained in:
parent
13577fc2b4
commit
bfaec8fdd8
|
@ -428,8 +428,8 @@ func (s *Strategy) handleFilledOrder(filledOrder types.Order) {
|
|||
amount = quantity * price
|
||||
}
|
||||
|
||||
if amount < s.Market.MinNotional {
|
||||
quantity = bbgo.AdjustFloatQuantityByMinAmount(quantity, price, s.Market.MinNotional)
|
||||
if amount <= s.Market.MinNotional {
|
||||
quantity = bbgo.AdjustFloatQuantityByMinAmount(quantity, price, s.Market.MinNotional * 1.001)
|
||||
|
||||
// update amount
|
||||
amount = quantity * price
|
||||
|
@ -458,7 +458,7 @@ func (s *Strategy) handleFilledOrder(filledOrder types.Order) {
|
|||
s.activeOrders.Add(createdOrders...)
|
||||
|
||||
if err != nil {
|
||||
log.WithError(err).Errorf("can not place orders")
|
||||
log.WithError(err).Errorf("can not place orders: %+v", submitOrder)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user