pkg/exchange: remove the limitation of query range due to bybit support the query

This commit is contained in:
Edwin 2023-09-27 14:44:11 +08:00
parent 1600277ac3
commit 9a05357350

View File

@ -437,13 +437,6 @@ ticketId in ascend. Otherwise, the result is sorted by ticketId in descend.
** StartTime and EndTime cannot exceed 180 days. **
*/
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.
req := e.v3client.NewGetTradesRequest()
req.Symbol(symbol)