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 provider serves Equity, Equity Option, and Crypto prices directly from Alpaca's Market Data API. This page explains our integration with their API and its functionality.

Sourcing

The Alpaca data provider sources data directly from Alpaca's Market Data API. If you use this data provider, Alpaca only provides the security price data. QuantConnect Cloud provides the auxiliary datasets.

Bar Building

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

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.

Alternative Data

Third-party data providers support most alternative datasets, except data that streams real-time intraday data. If you're using streaming datasets, like the Tiingo News Feed and Benzinga News Feed, include the QuantConnect data provider as an additional data provider.

Historical Data

The historical data that's available from the Alpaca data provider for history requests and warm-up periods depends on your Alpaca data plan. For more information about each plan, see the Data page on the Alpaca website.

Pricing

The Alpaca data feed is free for Alpaca subscription accounts. Your Alpaca plan defines the quota for the number of assets you can track at one time. If your algorithm adds more assets than your quota, LEAN logs an error message from Alpaca. To view the latest prices of the plans, 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: