Skip to main content

Poloniex data bundle for zipline, the pythonic algorithmic trading library.

Project description

Poloniex data bundle for zipline, the pythonic algorithmic trading library.


Just install the data bundle with pip:

pip install zipline-poloniex

and create a file $HOME/.zipline/ calling zipline’s register function. The create_bundle function returns the necessary ingest function for register. Use the Pairs record for common US-Dollar to crypto-currency pairs.


  1. Add following content to $HOME/.zipline/

import pandas as pd
from zipline_poloniex import create_bundle, Pairs, register

# adjust the following lines to your needs
start_session = pd.Timestamp('2016-01-01', tz='utc')
end_session = pd.Timestamp('2016-12-31', tz='utc')
assets = [Pairs.usdt_eth]

  1. Ingest the data with:

    zipline ingest -b poloniex
  2. Create your trading algorithm, e.g. with:

import logging

from zipline.api import order, record, symbol
from zipline_poloniex.utils import setup_logging

__author__ = "Florian Wilhelm"
__copyright__ = "Florian Wilhelm"
__license__ = "new-bsd"

# setup logging and all
_logger = logging.getLogger(__name__)"Dummy agent loaded")

def initialize(context):"Initializing agent...")
    # There seems no "nice" way to set the emission rate to minute
    context.sim_params._emission_rate = 'minute'

def handle_data(context, data):
    _logger.debug("Handling data...")
    order(symbol('ETH'), 10)
    record(ETH=data.current(symbol('ETH'), 'price'))
  1. Run your algorithm in with:

    zipline run -f ./ -s 2016-01-01 -e 2016-12-31 -o results.pickle --data-frequency minute -b poloniex
  2. Analyze the performance by reading results.pickle with the help of Pandas.


This project has been set up using PyScaffold 2.5.7. For details and usage information on PyScaffold see

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-poloniex-0.1.2.tar.gz (45.5 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page