Giter Club home page Giter Club logo

crypto-data's Introduction

Crypto Data Downloader

Download historical data for cryptocurrencies from binance.

Features:

  1. List all symbols for spot market, usd futures and coin futures.

  2. Download historical data for specific symbols or all symbols.

    download

    get-klines

    list-symbols

How to use:

  1. Download crypto-data binary from releases
  2. Grant execute permission to the binary:

$ chmod +x crypto-data

  1. Run the binary:

$ ./crypto-data --help

  1. If MacOS blocks the binary, you can unblock it by running:

$ xattr -d com.apple.quarantine crypto-data

  1. Most simple usage:

$ ./crypto-data get-klines --all

Detailed Usage:

  1. There are two major commands: list-symbols and get-klines
  2. You can get all the symbols by running $ ./crypto-data list-symbols for spot market symbols or $ ./crypto-data list-symbols -m usd-futures for usd futures and $ ./crypto-data list-symbols -m coin-futures for coin futures. Run $ ./crypto-data list-symbols --help for more information.
  3. To download historical data for specific symbols, run $ ./crypto-data get-klines <symbols>. For example: $ ./crypto-data get-klines --market coin-futures --interval 1h --start-time "2024-05-12 08:00:00" --end-time "2024-05-19 08:00:00" ETHUSD_240927 DOTUSD_PERP
  4. To download for all symbols, run $ ./crypto-data get-klines --market spot --interval 1h --start-time "2024-05-12 08:00:00" --end-time "2024-05-19 08:00:00" --all
  5. Run $ ./crypto-data --help or $ ./crypto-data get-klines --help or $ ./crypto-data list-symbols --help for detailed information.
  6. To run the binary behind proxy, you can set the environment variable HTTP_PROXY and HTTPS_PROXY to the proxy address. For example: export https_proxy=http://127.0.0.1:7897 http_proxy=http://127.0.0.1:7897 all_proxy=socks5://127.0.0.1:7897

crypto-data's People

Contributors

cckn1ght avatar

Watchers

 avatar

crypto-data's Issues

Decode error for coin-futures market, while spot market is ok.

$ ../crypto-data.exe get-klines --market coin-futures --interval 1d --start-time "2023-08-28 11:00:00" --end-time "2024-07-29 11:00:00" --all

Start time: 2023-08-28 11:00:00 UTC, End time: 2024-07-29 11:00:00 UTC, saving files to: \?\C:\Users\yuexn\PycharmProjects\crypto-model\release\crypto_futures_daily
thread 'main' panicked at src\utils.rs:166:60:
Can not get klines for BTCUSD_PERP: reqwest::Error { kind: Decode, source: Error("invalid type: map, expected a sequence", line: 1, column: 0) }
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

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.