Skip to content
All library documents

Choosing Tools and Data Sources for Cryptocurrency Strategy Research

Article Quant Q&A · Author: fccoelho

Summary

The discussion surveys software choices for researching and trading cryptocurrency strategies. It distinguishes analytical and backtesting platforms from exchange connectivity, and describes options mentioned by contributors, including Python-oriented systems, a framework built around exchange APIs, and a platform with live trading support. One answer favors building a dedicated trading system over time while using libraries or APIs for exchange connections, citing transparency and debugging as practical considerations.

Historical market data is presented as a central challenge. The document describes using an exchange-connection library to retrieve OHLCV candles, with a sample workflow that selects a market and interval, requests data from a start date, formats timestamps, and saves a delimited file. Contributors also discuss differences in data availability across exchanges and timeframes. These are personal recommendations and dated project-status reports, not a current comparison or performance evaluation. The material provides no evidence that any platform is reliable for a particular strategy, and historical data availability should be checked for the intended venue and market.

Key ideas

  • Separate strategy research and backtesting tools from exchange connectivity and live execution.
  • Exchange API libraries can help retrieve market candles across cryptocurrency venues.
  • Data coverage can vary by exchange, asset, and timeframe, so availability is a practical constraint.
  • A custom trading system can offer greater transparency and debugging control, but requires infrastructure work.
  • The platform recommendations and project status reflect contributors’ reports and may become outdated.

Tags

Full text
# Which Algorithmic trading library would you recommend for trading Bitcoin?


# Which Algorithmic trading library would you recommend for trading Bitcoin?












I am starting to do Algorithmic trading in cryptocurrencies using Python libraries. Most exchanges have RESTful API that make it easy to write you own code and get started.

However, I would like to benefit from the analytical features of established libraries such as zipline and others. However these do not support the trading of cryptocurrencies (yet).

Should I just try to write a backend for my favorite cryptocurrency exchange, or are there other options out there?

## Answer by Jaspal Singh Rathour (score 12)

https://quant.stackexchange.com/a/39160

I have started to do the same thing a few months ago.

You can test your strategies pretty much in any platform: I have tried:

backtrader - www.backtrader.com - python based, open source, with great documentation and community support, helpful author and some great features. If you have basic python then thiswould be my recommendation.

ninjatrader - free to download and good for the beginner with easy to use visuals - you can get this with backtrader too but you will need a bit more unix/python knowledge.

Wealthlab - similar to ninjatrader but comes with a strategy library so that you can get started straight away.

Gekko - Java nodejs based. really good platform to get up and running quickly and so far the only one where you can setup live bots, although backtrader user bartosh seems to have devleoped a branch using ccxt but I have not tested it. I left this option because I wanted to go down the python route.

I think the trickiest bit for most crypto bot enthusiasts is getting the data, so here is my ccxt script that will pull in the data from poloniex (you can change this - please refer to: https://github.com/ccxt/ccxt)

this particular one uses input format for ninjatrader.

Getting Data:

Best place to get it is ccxt - each exchange has different attributes but I have found that poloniex gives me the longest historical duration for most coins for 5m, 15m and 1d timeframes.

Here is a script you can use to pull info for poloniex:

```
import ccxt
import datetime
import time
import math
import pandas as pd

# DATA FEED FROM EXCHANGE
symbol = str('ETH/USDT')
timeframe = str('1d')
exchange = str('poloniex')
exchange_out = str(exchange)
start_date = str('2014-01-01 00:00:00')
get_data = True

def to_unix_time(timestamp):
    epoch = datetime.datetime.utcfromtimestamp(0)  # start of epoch time
    my_time = datetime.datetime.strptime(timestamp, "%Y-%m-%d %H:%M:%S")  # plugin your time object
    delta = my_time - epoch
    return delta.total_seconds() * 1000

# CSV File Name
symbol_out = symbol.replace("/", "")
filename = '{}-{}-{}.csv'.format(exchange_out, symbol_out, timeframe)
out_filename = '{}-{}-{}-out.csv'.format(exchange_out, symbol_out, timeframe)

# Get our Exchange
exchange = getattr(ccxt, exchange)()
exchange.load_markets()
hist_start_date = int(to_unix_time(start_date))

data = exchange.fetch_ohlcv(symbol, timeframe, since=hist_start_date)
header = ['Timestamp', 'Open', 'High', 'Low', 'Close', 'Volume']
df = pd.DataFrame(data, columns=header)
df['Timestamp'] = pd.to_datetime(df['Timestamp'], unit='ms')
df['Timestamp'] = df['Timestamp'].dt.strftime('%Y%m%d %H%M')

#Precision

df[['Volume']] = df[['Volume']].astype(int)

# Save it
df.to_csv(filename, index= False,header=False, sep=';')
```

Backtest rookies is a great site to get you started - the author also seems to be a really nice guy: https://backtest-rookies.com.

Here is a great list of a lot of other quant stuff:

https://github.com/EliteQuant/EliteQuant/blob/master/README.md#cryptocurrency

Good luck!

EDIT: 7/3/18: One more to add - Zorro - https://zorro-project.com/. programmable using c-lite, fast, good tutorials https://www.financial-hacker.com/ - free version available for low trading volumes and able to download historical data from a number of sources.

EDIT: 12/4/19: This is a great link A list of online resources for quantitative modeling, trading, portfolio management.

https://github.com/EliteQuant/EliteQuant

## Answer by JaredBroad (score 11)

https://quant.stackexchange.com/a/22626

QuantConnect has had users work on contributing REST bitcoin brokerages - its fully open source and has complete modeling support for currencies. It also has python support in beta.

https://www.quantconnect.com/forum/discussion/958/bitfinex-brokerage

(I'm the founder of QuantConnect)

Edit: Fully support python and cryptocurrencies now. We've pushed GDAX brokerage into production!

Edit (12/2017): A community user has contributed a Bitfinex implementation. It is in the PR phase now.

Edit (7/2019): Bitfinex has been in production for about 6 months and is stable. We have installed full quote-trade tick data from both GDAX and Bitfinex available for free backtesting on the website.

## Answer by Igor Kroitor (score 8)

https://quant.stackexchange.com/a/34917

Check out my ccxt library on GitHub: https://github.com/ccxt/ccxt

With it you can access market data and trade bitcoin and altcoins with many cryptocurrency exchanges. The library is in Python 2 & 3 (JavaScript and PHP versions are also available as well). You can deploy it from PyPI, with npm or by cloning from GitHub repository.

The ccxt library is under heavy development right now, but already offers a quick-start for trading and technical analysis with many crypto exchange markets out of the box.

## Answer by perelin (score 2)

https://quant.stackexchange.com/a/35709

Just starting to check it out, but https://www.enigma.co/ seems to have a Crypto framework based on zipline in the making.

UPDATE May 2021: Project seems to be dead: https://github.com/enigmampc/catalyst/issues/576

## Answer by Will Gu (score 1)

https://quant.stackexchange.com/a/37219

https://github.com/askmike/gekko looks pretty good

you can probably find a lot of similar repos on github. depending on the type of algo/strategy you want to use, these might suffice or come short. language is another concern. based on my research, node.js is probably the most common one for crypto trading, python runner-up.

ultimately I'd suggest build up your own infra for trading and utilize some of the api or wrapper libraries for connections, because a full-fledged in-house trading system is more robust, transparent, and easier for debugging. ultimately you'd benefit from it in the long run.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.