When end_ts is passed historical klines are fetched until Binance API returns no results. With every query start_ts is incremented. For the most part this cause one unnecessary query to Binance to be made, where start_ts is bigger than end_ts. Moreover, when fetching klines for future markets (not spot), Binance API returns an error in such condition (-1023). This makes it impossible to fetch klines for future markets when providing end_str param.
When end_ts is passed historical klines are fetched until Binance API returns no results. With every query start_ts is incremented. For the most part this cause one unnecessary query to Binance to be made, where start_ts is bigger than end_ts. Moreover, when fetching klines for future markets (not spot), Binance API returns an error in such condition (-1023). This makes it impossible to fetch klines for future markets when providing end_str param.