下载bitMEX历史价格数据的实用程序

getBitMEXData的Python项目详细描述


这是一个用于下载和更新Bitmex历史价格数据的实用程序。 它可以下载多个尺寸(“1米”、“5米”或更粗的)。默认情况下你 可以轻松下载XBTUSD和ADAM20仪器的数据。在

许可证

GNU通用公共许可证第3版,2007年6月29日

安装

git clone git@github.com:maliky/getBitMEXData.git
cd getBitMEXData

或者用皮普

^{pr2}$

使用

只需运行getBitMEXData.py比如说这个

python getBitMEXData.py --startTime "2019-08-01" --live
# or if you install with pip
getBitMEXData --startTime "2020-06-01"  --live

或更新以前下载的现有文件getBitMEXData.py (csv文件的列应该相同)。它将从 文件中最后保存的记录以及文件名和 从那里继续。在

python update_date.py yourBitmexDataFile-1d.csv

帮助和其他选项

python -m  getBitMEXData.getBitMEXData -h
usage: getBitMEXData.py [-h][--fout FOUT][--count COUNT][--pause PAUSE][--binSize BINSIZE][--startTime STARTTIME][--endTime ENDTIME][--live][--logLevel LOGLEVEL][--entryPoint ENTRYPOINT][--symbol SYMBOL]

An application to download bitmex's data with what ever resolution you need.

optional arguments:
  -h, --help            show this help message and exit
  --fout FOUT, -f FOUT  base Name of the csv file where to save the results.
                        (default btxData-freq-lastrecorddate.csv)
  --count COUNT, -c COUNT
                        Max number each of records in requests (default 600)
  --pause PAUSE, -p PAUSE
                        Min time to wait between 2 requests (default 1.2). to
                        avoid overloading the server
  --binSize BINSIZE, -b BINSIZE
                        Bin size or type requested, or time resolution
                        (default 1d), can also be 1m, 5m, 1h.
  --startTime STARTTIME, -s STARTTIME
                        Time to start the data collection (default, oldest
                        available 2016-05-05 04:00:00 'UTC'). Check time zones
  --endTime ENDTIME, -e ENDTIME
                        Time to end the data collection (default, now - 1 unit
                        of chosen resolution)-05-05 04:00:00 'UTC'). Check TZ
  --live, -l            If present use LIVE keys to get the data else use the
                        test site.
  --logLevel LOGLEVEL, -L LOGLEVEL
                        set the log level
  --entryPoint ENTRYPOINT, -E ENTRYPOINT
                        Set the entry level. the path to append to the LIVE or
                        TEST url before the query
  --symbol SYMBOL, -S SYMBOL
                        Set the symbol for which to get historical data def.
                        XBTUSD. default start date may change depending on
                        symbol

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Android HttpClient cookies   如何使用Java在远程系统上运行SSH命令?   java从字符串数组中的字符串末尾删除“,”   在One plus 3t手机上,当应用程序被终止或从最近的应用程序中刷出时,java Android FCM推送通知不起作用   java如何使垂直滚动条始终位于jtable的末尾   在java中解析迄今为止“未知”的字符串   javascript在Java中获取Nashorn JsonObject   java windows 10和ubuntu可以使用相同的JDK吗?   java在不同的文件中记录不同的日志。但所有日志都放在同一个文件中   具有特定jdk的java Gradle构建项目   xml Java web服务生成错误响应   javascript Jaggery文件更改不显示   java输出二进制搜索树数组   将BufferedReader解析为JSON对象时,java在位置处意外标记文件结尾