Skip to main content

BitMEX bundle for Zipline

Project description

BitMEX bundle for Zipline

[WARNING] There is a bug in this repo. It can ingest the data from the BitMEX API to the Zipline folder, but somehow I can’t run an algorithm upon it. Any PRs or advice would be appreciated!

Usage

  1. Install this package with pip:

pip install zipline-bitmex

. You may want to run this command with --user parameter.

  1. Register this package to Zipline by writing following content to $HOME/.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,
)
  1. Ingest the data bundle with:

zipline ingest -b bitmex

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zipline-bitmex-0.1.2.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

zipline_bitmex-0.1.2-py3-none-any.whl (16.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page