About Binance US Crypto Price Data

The Binance US Crypto Price Data by CoinAPI is for Cryptocurrency price and volume data points. The data covers 537 Cryptocurrency pairs, starts in October 2019, and is delivered on any frequency from tick to daily. This dataset is created by monitoring the trading activity on Binance US.


About CoinAPI

CoinAPI was founded by Artur Pietrzyk in 2016 with the goal of providing real-time and historical cryptocurrency market data, collected from hundreds of exchanges. CoinAPI provides access to Cryptocurrencies for traders, market makers, and developers building third-party applications.

Add Binance US Crypto Price Data

Add Dataset Create Free QuantConnect Account

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 CoinAPIDataAlgorithm(QCAlgorithm):

    def Initialize(self) -> None:
        self.SetStartDate(2020, 6, 1)
        self.SetEndDate(2021, 6, 1)
        self.SetCash(100000)
        self.UniverseSettings.Asynchronous = True
        # BinanceUS accepts Cash account type only, AccountType.Margin will result in an exception.
        self.SetBrokerageModel(BrokerageName.BinanceUS, AccountType.Cash)

        # Warm up the security with the last known price to avoid conversion error
        self.SetSecurityInitializer(lambda security: security.SetMarketPrice(self.GetLastKnownPrice(security)))

        # Requesting data
        crypto = self.AddCrypto("BTCUSD", Resolution.Minute, Market.BinanceUS)
        self.btcusd = crypto.Symbol
        self.minimum_order_size = crypto.SymbolProperties.MinimumOrderSize
        
        # Historical data
        history = self.History(self.btcusd, 30, Resolution.Daily)
        self.Debug(f"We got {len(history)} items from our history request")

        # Add Crypto Universe Selection
        self.universe = self.AddUniverse(CryptoUniverse.BinanceUS(self.UniverseSelectionFilter))

        # Historical Universe data
        universe_history = self.History(self.universe, 30, Resolution.Daily)
        self.Debug(f"We got {len(universe_history)} items from our universe history request")
        for (univere_symbool, time), universe_day in universe_history.items():
            for universe_item in universe_day:
                self.Debug(f"{universe_item.Symbol} price at {universe_item.EndTime}: {universe_item.Close}")

    def UniverseSelectionFilter(self, universe_day):
        return [universe_item.Symbol for universe_item in universe_day
                if universe_item.Volume >= 100 
                and universe_item.VolumeInUsd > 10000]

    def OnData(self, slice: Slice) -> None:
        if self.Portfolio.CashBook['BTC'].Amount == 0:
            free_cash = self.Portfolio.CashBook['USD'].Amount * (1-self.Settings.FreePortfolioValuePercentage)
            quantity = free_cash / slice[self.btcusd].Price
            quantity -= quantity % self.minimum_order_size
            if quantity > 0:
                self.MarketOrder(self.btcusd, quantity)

Example Applications

The Binance US Crypto Price dataset enables you to accurately design strategies for Cryptocurrencies. Examples include the following strategies: