algocoin

Algorithmic trading library for cryptocurrencies


Keywords
algorithmic, trading, cryptocurrencies, algorithmic-trading, bitcoin, bitcoin-cash, coinbase, cryptocurrency, ethereum, exchange, gdax, gemini, itbit, kraken, poloniex, python, python3, zcash
License
GPL-2.0+
Install
pip install algocoin==0.0.2

Documentation

AlgoCoin

Algorithmic Trading Bitcoin.

UPDATE: MASTER is working for market orders ONLY on gemini. Everything else is still in beta until limit order support is done

Version Build Status Coverage Gitter Waffle.io BCH compliance Beerpay License PyPI Site

Overview

Lightweight, extensible program for algorithmically trading cryptocurrencies across multiple exchanges.

System Architecture

AlgoCoin is an event based trading system written in python. It comes with support for live trading across (and between) multiple exchanges, fully integrated backtesting support, slippage and transaction cost modeling, and robust reporting and risk mitigation through manual and programatic algorithm controls.

Algorithm

Like Zipline, the inspriation for this system, AlgoCoin exposes a single algorithm class which is utilized for both live trading and backtesting. The algorithm class is simple enough to write and test algorithms quickly, but extensible enough to allow for complex slippage and transaction cost modeling, as well as mid- and post- trade analysis.

Markets

Eventual coverage:

  • Bitstamp
  • Bitfinex
  • CEX
  • GDAX
  • Gemini
  • HitBTC
  • ItBit
  • Kraken
  • LakeBTC
  • Poloniex

Market Data (Websocket)

GDAX GEMINI ITBIT KRAKEN POLONIEX

Order Entry (REST)

GDAX GEMINI ITBIT KRAKEN POLONIEX


Getting Started

Installation

Install the library from source:

python setup.py install

API Keys

You should creat API keys for exchanges you wish to trade on. For this example, we will assume a GDAX sandbox account with trading enabled. I usually put my keys in a set of shell scripts that are gitignored, so I don't post anything by accident. My scripts look something like:

export GDAX_API_KEY=...
export GDAX_API_SECRET=...
export GDAX_API_PASS=...

Prior to running, I then source the keys I need.

Let's make sure everything worked out by running a sample strategy on the GDAX sandbox exchange:

python3 -m algocoin --sandbox

Writing an algorithm

Backtesting

Getting Data

Sandboxes

Live Trading


Contributing