mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-23 15:25:14 +00:00
grid2: add UpdateZeroOrderFee option
This commit is contained in:
parent
c3f38c0dd0
commit
bf00f93f76
|
@ -163,6 +163,11 @@ type Strategy struct {
|
|||
// it makes sure that your grid configuration is profitable.
|
||||
FeeRate fixedpoint.Value `json:"feeRate"`
|
||||
|
||||
// UpdateZeroOrderFee - this option adds an extra retry when the order fee returns zero
|
||||
// sometimes the fee is not ready yet, the exchange did not finish the fee calculation.
|
||||
// and there is a delay between the fee is calculated
|
||||
UpdateZeroOrderFee bool `json:"updateZeroOrderFee"`
|
||||
|
||||
SkipSpreadCheck bool `json:"skipSpreadCheck"`
|
||||
RecoverGridByScanningTrades bool `json:"recoverGridByScanningTrades"`
|
||||
|
||||
|
@ -425,7 +430,7 @@ func (s *Strategy) processFilledOrder(o types.Order) {
|
|||
fee.String(), feeCurrency)
|
||||
|
||||
// do 1 time retry
|
||||
if fee.IsZero() || feeCurrency == "" {
|
||||
if s.UpdateZeroOrderFee && (fee.IsZero() || feeCurrency == "") {
|
||||
time.Sleep(queryOrderTradesRetryDelay)
|
||||
|
||||
fee, feeCurrency = s.aggregateOrderFee(o)
|
||||
|
|
Loading…
Reference in New Issue
Block a user