Package: binance_pandas_dataframe
Overviewbinance_pandas_dataframe collects the historical data fromhttps://data.binance.visionand builds Pandas dataframes from them
for use in Python.The code was forked fromhttps://github.com/binance/binance-public-data, and the logic to build
the  Pandas dataframe was added.If you want to process data in a tool other than Python, such as R, Julia, or excel, you can usepandas_dataframe_convertto convert the dataframes produced by binance_pandas_dataframe to 'pkl', 'ftr', 'json', 'xlsx', 'csv', 'md', 'latex', or 'parquet'.StatusCurrently only klines work.InstallingInstalling from PyPipip install binance_pandas_dataframesInstalling from your git clone.Flit is used to build the python package for installation with pip.  Flit will call pip as required.This is the best way to do it.  In windows, do this from an adminstrator powershell
for the symlink permissions.flit install --symlinkor you can install it this way, you will have to uninstall with pip and reinstall with flit for every change in a source file.flit installRunning the scriptsThe scripts are installed in your python Scripts folder which should be in your path.export STORE_DIRECTORY=<your desired path>This will configure the default storing directory of the downloaded data. This can be
overwrittenby setting an argument(example given below).download_klinedownload_tradedownload_aggTradeDownloads all monthly and daily(for past 35 days) klines/trades/aggTrades of all intervals(applicable to klines only) and symbols.download_kline --helpThis will show the arguments that can be parsed to the scripts which can be used to configure download options.usage: download_kline [-h] [-s SYMBOLS [SYMBOLS ...]] [-a ALL_SYMBOLS [ALL_SYMBOLS ...]] [-y {2017,2018,2019,2020,2021,2022}] [-folder FOLDER] [-c {0,1}] [-t {spot,um,cm}] [-o OFILE] [--stdout] -i {1m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,1mo}
[{1m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,1mo} ...]This is a script to download historical klines dataoptional arguments:
-h, --help            show this help message and exit
-s SYMBOLS [SYMBOLS ...]
Single symbol or multiple symbols separated by space
-a ALL_SYMBOLS [ALL_SYMBOLS ...]
download all symbols. because you can.
-y {2017,2018,2019,2020,2021,2022}
Single year to start, read all klines data until today
-folder FOLDER        Directory to store the downloaded data
-c {0,1}              1 to download checksum file, default 0
-t {spot,um,cm}       Valid trading types: ['spot', 'um', 'cm']
-o OFILE              file for pandas dataframe.  Recommend using the .pkl extension.
if you want another format for analyzing in R, excel, etc use
dataframe_convert.--stdout              write the dataframe to stdandard output.  usueful if using a shell pipeline.  you can pipe output to
dataframe_convert  if you want a format for use in  excel, R, etc.-i {1m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,1mo} [{1m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,1mo} ...]
single kline interval or multiple intervals separated by space
-i 1m 1w means to download klines interval of 1minute and 1weeke.g.download_kline.cmd  -y 2021  -s ETHUSDT -o test.pkldataframe_convert  -i test.pkl -o test.csvto download to test.pkl and to create a csv as well