mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
pkg/exchange: remove the limitation of query range due to bybit support the query
This commit is contained in:
parent
1600277ac3
commit
9a05357350
|
@ -437,13 +437,6 @@ ticketId in ascend. Otherwise, the result is sorted by ticketId in descend.
|
||||||
** StartTime and EndTime cannot exceed 180 days. **
|
** StartTime and EndTime cannot exceed 180 days. **
|
||||||
*/
|
*/
|
||||||
func (e *Exchange) QueryTrades(ctx context.Context, symbol string, options *types.TradeQueryOptions) (trades []types.Trade, err error) {
|
func (e *Exchange) QueryTrades(ctx context.Context, symbol string, options *types.TradeQueryOptions) (trades []types.Trade, err error) {
|
||||||
if options.StartTime != nil && options.EndTime != nil && options.EndTime.Sub(*options.StartTime) > halfYearDuration {
|
|
||||||
return nil, fmt.Errorf("StartTime and EndTime cannot exceed 180 days, startTime: %v, endTime: %v, diff: %v",
|
|
||||||
options.StartTime.String(),
|
|
||||||
options.EndTime.String(),
|
|
||||||
options.EndTime.Sub(*options.StartTime)/24)
|
|
||||||
}
|
|
||||||
|
|
||||||
// using v3 client, since the v5 API does not support feeCurrency.
|
// using v3 client, since the v5 API does not support feeCurrency.
|
||||||
req := e.v3client.NewGetTradesRequest()
|
req := e.v3client.NewGetTradesRequest()
|
||||||
req.Symbol(symbol)
|
req.Symbol(symbol)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user