Extracting data in a specific date range with Aggregate Trade Iterator

Hello there. Using the code below with Python, I can pull historical trade data from the date I want. However, it gives me the data from the date I type to the date of the most recent transaction.

For example, I want to get data between 01.11.2021 03:00 and 02.01.2021 03:00, but this command gives me data up to today’s date.

is it possible to get trade data with specific date ranges?

is it possible to get trade data with specific date ranges?

Yes this is possible, using the startTime and endTime parameters.

For example, I want to get data between 01.11.2021 03:00 and 02.01.2021 03:00, but this command gives me data up to today’s date.

Time parameters are expected to be in unix epoch milliseconds timestamp. In addition, the time difference between the startTime and endTime must not exceed 24hrs.

Here is an example for the above scenario, with startTime at 2021 January 11 3:00am UTC & endTime at 2021 January 12 3:00am UTC.


https://api.binance.com/api/v3/myTrades?symbol=BTCUSDT&startTime=1610334000000&endTime=1610420400000&timestamp=<timestamp>&signature=<signature>