About Crypto Market Cap

The Crypto Market Cap dataset by CoinGecko tracks the market cap of cryptocurrencies. The data covers 620 cryptocurrencies that are supported by QuantConnect, starts in 28 April 2013, and is delivered on a daily frequency. This dataset is created by scraping CoinGecko's Market Chart.


About CoinGecko

CoinGecko was founded in 2014 by TM Lee (CEO) and Bobby Ong (COO) with the mission to democratize the access of crypto data and empower users with actionable insights. We also deep dive into the crypto space to deliver valuable insights to our users through our cryptocurrency reports, as well as our publications, newsletter, and more.


About QuantConnect

QuantConnect was founded in 2012 to serve quants everywhere with the best possible algorithmic trading technology. Seeking to disrupt a notoriously closed-source industry, QuantConnect takes a radically open-source approach to algorithmic trading. Through the QuantConnect web platform, more than 50,000 quants are served every month.


Algorithm Example

from AlgorithmImports import *

class CoinGeckoAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2018, 4, 4)   # Set Start Date
        self.set_end_date(2018, 4, 6)    # Set End Date

        self.crypto_symbol = self.add_crypto("BTCUSD").symbol
        self.custom_data_symbol = self.add_data(CoinGecko, "BTC").symbol
        self.window = RollingWindow[CoinGecko](2)

    def on_data(self, slice: Slice) -> None:
        data = slice.Get(CoinGecko)
        if data and self.custom_data_symbol in data:
            self.window.add(data[self.custom_data_symbol])
            if not self.window.is_ready:
                return

            # Buy BTCUSD if the market cap of BTC is increasing
            if self.window[0].market_cap > self.window[1].market_cap:
                self.set_holdings(self.crypto_symbol, 1)
            else:
                self.set_holdings(self.crypto_symbol, -1)

    def on_order_event(self, orderEvent: OrderEvent) -> None:
        if orderEvent.status == OrderStatus.FILLED:
            self.debug(f'Purchased Stock: {orderEvent.symbol}')

Example Applications

The CoinGecko Crypto Market Cap dataset provide information on the size of the crypto coin and can be used to compare the size of one coin to another. Examples include the following strategies: