binance / binance/binance-public-data

`python/download-futures-markPriceKlines.py` ignores `-skip-monthly` and `-skip-daily` flags

Open Beginner friendly
#445 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
2.5k
Forks
613
PR merge metrics
No merged PRs in 30d

Description

### Description
The script `python/download-futures-markPriceKlines.py` fails to respect the `-skip-monthly` and `-skip-daily` arguments, resulting in unconditional downloads of both data types regardless of user input.

### Root Cause Analysis (Historical Context)
This bug was introduced in **Commit `df27179`** ([View Commit](https://github.com/binance/binance-public-data/commit/df2717909e3e3923058f8a74477653cc4258525a)) on **May 23, 2022**.

In that commit:
1. The flags `-skip-monthly` and `-skip-daily` were correctly added to the shared argument parser in `python/utility.py`.
2. The logic to respect these flags was correctly implemented in `python/download-kline.py`.
3. However, for the newly created `python/download-futures-markPriceKlines.py`, while the parser inherited these flags, the conditional logic to check them was omitted. The script calls `download_daily_markPriceKlines` unconditionally at the end of execution.

### Steps to Reproduce
Run the script attempting to skip daily data:
```bash
python python/download-futures-markPriceKlines.py -t um -s BTCUSDT -skip-daily 1
```

**Observed Result:**
The script proceeds to download daily data files, ignoring the flag.

**Expected Result:**
The script should skip the daily data download phase, consistent with the behavior of `download-kline.py`.

### Proposed Fix
Add conditional checks for `args.skip_monthly` and `args.skip_daily` before invoking the respective download functions.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with python/download-futures-markPriceKlines.py and compare its flag handling with python/download-kline.py and the shared arguments in python/utility.py. Run the reproduction command with -skip-daily 1, then verify that the daily phase is skipped and that the monthly flag likewise prevents monthly downloads.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, data
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.