[WARNING] This Python module is unusable by now due to an upstream bug of Zipline. Unfortunately, it seems that Zipline is no longer under maintenance.
- Install this package with pip.
pip install --user zipline-bitmex
- Register this package to Zipline by amending the following script to
~/.zipline/extension.py
.
from zipline.data.bundles import register
from zipline_bitmex import bitmex_bundle
import pandas as pd
start = pd.Timestamp('2019-01-01', tz='utc')
end = pd.Timestamp('2019-01-07', tz='utc')
register(
'bitmex',
bitmex_bundle(['XBTUSD']),
calendar_name='bitmex',
start_session=start,
end_session=end,
minutes_per_day=24*60,
)
- Ingest the data bundle.
zipline ingest -b bitmex