Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

it does not download as per mentioned start_date #14

Open
Devarsh-leo opened this issue Jun 24, 2023 · 0 comments
Open

it does not download as per mentioned start_date #14

Devarsh-leo opened this issue Jun 24, 2023 · 0 comments

Comments

@Devarsh-leo
Copy link

Devarsh-leo commented Jun 24, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant