Datasets

Alpaca

Introduction

Alpaca was founded by Yoshi Yokokawa and Hitoshi Harada in 2015 as a database and machine learning company. In 2018, Alpaca Securities LLC (Alpaca Securities) became a registered US broker-dealer with the Financial Industry Regulatory Authority (FINRA) with the mission to "open financial services to everyone on the planet". In 2022, Alpaca Crypto LLC (Alpaca Crypto) became a registered Money Services Business (MSB) with the Financial Crimes Enforcement Network (FinCEN). Alpaca provides access to trading Equities, Options, and Crypto for clients in over 30 countries. Alpaca also delivers custody, clearing, execution, and billing on behalf of registered advisors.

The Alpaca data feeds are streams of Equity, Equity Option and Crypto prices directly from Alpaca. If you use this data feed and request historical data, the historical data comes from Alpaca.

Sourcing

The Alpaca data feed comes directly from Alpaca. For more information about the data source, see the Alpaca data documentation.

If you use the Alpaca data provider, Alpaca only provides the security price data. We provide the following auxiliary datasets from the Dataset Market:

Universe Selection

Universe selection is available with the Alpaca data provider.

UniverseSettings.Asynchronous = true;
AddUniverse(FundamentalUniverseSelection);
self.universe_settings.asynchronous = True
self.add_universe(self.fundamental_universe_selection)

The Alpaca data provider can stream data for up to 30 assets by default. If your algorithm adds more than the your quota, LEAN logs an error message from Alpaca. To increase the quota, purchase a unlimited market data plan from Alpaca.

Bar Building

The data feed is a stream of asset prices collected by WebSockets and distributed to algorithms on the platform.

Alternative Data

Third-party data providers support most alternative datasets, except data that streams real-time intraday data. Streaming datasets, like the Tiingo News Feed and Benzinga News Feed, require the QuantConnect data provider.

Hybrid Data Provider

When you deploy a live algorithm with the Alpaca brokerage, you can use a third-party data provider, the Alpaca data provider, or both. If you use multiple data providers, the order you select them in defines their order of precedence in Lean. For example, if you set QC as the first provider and Alpaca as the second provider, Lean only uses the Alpaca data provider for securities that aren't available from the QC data provider. This configuration makes it possible to use our data provider for Equity universe selection and then place Options trades on the securities in the universe.

Pricing

The Alpaca data feed is free for Alpaca subscription accounts. The free data feed has a quota of 30 assets and 200 API calls per minute. Alpaca offers unlimited market data plans. To view the latest prices, see the Data page on the Alpaca website.

You can also see our Videos. You can also get in touch with us via Discord.

Did you find this page helpful?

Contribute to the documentation: