GithubHelp home page GithubHelp logo

binance-market-data-downloader's Introduction

Overview

Binance supports historical market data download at https://data.binance.vision/?prefix=data/, go ahead and have a look at the organization. We utilize that link for downloading data.

The basic idea is as follows:

  1. You specify a list of paths to download. If the path doesn't point to a file, all files under that path will be checked.
  2. You may also specify a list of paths for excluding downloading. Its meaning is the same with that of the ones for downloading.
  3. You specify start date and end date to download, only data in the range will be downloaded.
  4. You may specify whether to overwrite a file if it is already on the disk. Notice the content of a file on the website could change in theory, and we simply don't check that.
  5. You may utilize concurrency for speeding up.

In case links of items could change in the future and don't comply with their paths, we traverse from the root instead of taking a shortcut.

We utilize selenium to fetch dynamic pages.

Example

from downloader import BinanceDownloader

paths = [
    'https://data.binance.vision/?prefix=data/futures/um/monthly/klines/*USDT/1d/',
    # 'futures/um/monthly/klines/*USDT/1d/', # or remove `https://data.binance.vision/?prefix=data/`
]
start_date = '2023-01-01'

bn_downloader = BinanceDownloader(paths=paths, start_date=start_date, output_dir='output',
                                  parallel=10)
bn_downloader.download()

binance-market-data-downloader's People

Contributors

cogisum avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.