Hello!

I want to develop an algorithm for trading Bitcoins. For this purpose I need to import the data.

According to the documentation ( https://www.quantconnect.com/docs#python ) you need to create your own class (subclass of PythonData) in order to access custom data. That subclass must override the GetSource and Reader methods:

class Weather(PythonData):
''' Weather based rebalancing'''

def GetSource(self, config, date, isLive):
source = "https://www.wunderground.com/history/airport/{0}/{1}/1/1/CustomHistory.html?dayend=31&monthend=12&yearend={1}&format=1".format(config.Symbol, date.year);
return SubscriptionDataSource(source, SubscriptionTransportMedium.RemoteFile);


def Reader(self, config, line, date, isLive):
# If first character is not digit, pass
if not (line.strip() and line[0].isdigit()): return None

data = line.split(',')
weather = Weather()
weather.Symbol = config.Symbol
weather.Time = datetime.strptime(data[0], '%Y-%m-%d') + timedelta(hours=20) # Make sure we only get this data AFTER trading day - don't want forward bias.
weather.Value = decimal.Decimal(data[2])
weather["MaxC"] = float(data[1])
weather["MinC"] = float(data[3])

return weather

However, this seems to be a CSV data source, whereas the Quandl Bitcoin data are in JSON format.

What do I need to do in order to be able to use Quandl Bitcoin data in QuantConnect for backtesting?

I found a class PythonQuandl.cs in the same directory as PythonData, but unfortunately no documentation on how to use it.

Thanks in advance

Dmitri Pisarenko