Skip to main content

This is an utility to download and update Bitmex historical price data. It can download several binSize (“1m”, “5m” or coarser). By default you can easily download data for XBTUSD and ADAM20 instruments.

Licence

GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007

Installation

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

Or with pip

pip install getBitMEXData

Usage

Just run the getBitMEXData.py like this for exemple

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

Or update an existing file previously downloaded with getBitMEXData.py (columns of csv file should be the same). It will get the time from the last saved record in the file and the bin size from the file name and continue from there.

python update_date.py yourBitmexDataFile-1d.csv

Help and other options

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

Release files for getBitMEXData 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for getBitMEXData 0.1.3
File Size Uploaded
getBitMEXData-0.1.3.tar.gz 16.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for getBitMEXData 0.1.3
File Interpreter ABI Platform
getBitMEXData-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 46.4 kB

Release files / getBitMEXData-0.1.3.tar.gz

Download URL getBitMEXData-0.1.3.tar.gz
Size 16.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5666610dcc2f364ba82e124b7669c04b52e10ab21764cf4a8f721a13ee7ef950
BLAKE2b-256 checksum
How to use checksums
a0fdebb867802fa885ff6fd698a150ba40124b6649944cc10a80febccd19fb1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

Release files / getBitMEXData-0.1.3-py3-none-any.whl

Download URL getBitMEXData-0.1.3-py3-none-any.whl
Size 30.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4b680a29e44508c3778d6ecb492cdf8d47c640bf8e17c072a9656d92631832fd
BLAKE2b-256 checksum
How to use checksums
6bb29938c2d82cd86cbaa1771b950b1fceeea8d068d650fe5ef2bf6fd8d82e25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page