mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 16:25:16 +00:00
batch: set jump if empty field
This commit is contained in:
parent
484fc62892
commit
5bb98734fb
|
@ -17,6 +17,7 @@ func (e *MarginInterestBatchQuery) Query(ctx context.Context, asset string, star
|
|||
query := &AsyncTimeRangedBatchQuery{
|
||||
Type: types.MarginInterest{},
|
||||
Limiter: rate.NewLimiter(rate.Every(5*time.Second), 2),
|
||||
JumpIfEmpty: time.Hour * 24 * 30,
|
||||
Q: func(startTime, endTime time.Time) (interface{}, error) {
|
||||
return e.QueryInterestHistory(ctx, asset, &startTime, &endTime)
|
||||
},
|
||||
|
|
|
@ -18,6 +18,7 @@ func (e *MarginLiquidationBatchQuery) Query(ctx context.Context, startTime, endT
|
|||
query := &AsyncTimeRangedBatchQuery{
|
||||
Type: types.MarginLiquidation{},
|
||||
Limiter: rate.NewLimiter(rate.Every(5*time.Second), 2),
|
||||
JumpIfEmpty: time.Hour * 24 * 30,
|
||||
Q: func(startTime, endTime time.Time) (interface{}, error) {
|
||||
return e.QueryLiquidationHistory(ctx, &startTime, &endTime)
|
||||
},
|
||||
|
|
|
@ -18,6 +18,7 @@ func (e *MarginRepayBatchQuery) Query(ctx context.Context, asset string, startTi
|
|||
query := &AsyncTimeRangedBatchQuery{
|
||||
Type: types.MarginRepay{},
|
||||
Limiter: rate.NewLimiter(rate.Every(5*time.Second), 2),
|
||||
JumpIfEmpty: time.Hour * 24 * 30,
|
||||
Q: func(startTime, endTime time.Time) (interface{}, error) {
|
||||
return e.QueryRepayHistory(ctx, asset, &startTime, &endTime)
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user