Skip to content

it does not download as per mentioned start_date #14

@Devarsh-leo

Description

@Devarsh-leo

Hello, when I tried to download file by providing only start date, it did data from start of the current month.
To reproduce the problem use below code:

from binance_historical_data import BinanceDataDumper
from datetime import date

data_dumper = BinanceDataDumper(
    path_dir_where_to_dump=".",
    asset_class="um",  # spot, um, cm
    data_type="klines",  # aggTrades, klines, trades
    data_frequency="1m",
)

data_dumper.dump_data(
    tickers=None,
    date_start=date(day=23,month=6,year=2023),
    date_end=None,
    is_to_update_existing=False,
    tickers_to_exclude=["UST"],
)

maybe replacing below code:

# 2) Download all daily date
if self._data_type == "metrics":
    date_start_daily = date_start
else:
    date_start_daily = date_end_first_day_of_month

with:

# 2) Download all daily date
date_start_daily = date_start

will do the job.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions