Skip to content

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

Description

@xdifu

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) 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:

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions