mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
use getLaunchDate
This commit is contained in:
parent
21c037a877
commit
9fab37a284
|
@ -346,8 +346,11 @@ func (e *Exchange) queryClosedOrdersByTime(ctx context.Context, symbol string, s
|
|||
return orders, err
|
||||
}
|
||||
|
||||
// there is since limit for closed orders API
|
||||
sinceLimit := time.Date(2018, time.January, 1, 0, 0, 0, 0, time.Local)
|
||||
// there is since limit for closed orders API. If the since is before launch date, it will respond error
|
||||
sinceLimit, err := e.getLaunchDate()
|
||||
if err != nil {
|
||||
return orders, err
|
||||
}
|
||||
if since.Before(sinceLimit) {
|
||||
since = sinceLimit
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user