Help / Connect your data
Connect Alpaca for US stocks
US stocks and ETFs chart from your own Alpaca account. It’s free, and a paper trading account is enough: no money, funding or trading is needed.
Step by step#
- Go to alpaca.markets and sign up. Confirm your email when Alpaca asks.
- Signed in to Alpaca, switch to your Paper account if it asks which (the paper account needs no identity checks).
- Find API Keys on the dashboard’s home page and generate a new pair. Copy the Key ID and the Secret key straight away: Alpaca shows the secret only once.
- Open the Account page and find Stock data (Alpaca). Paste the key ID into API key ID and the secret into Secret key, choose Paper account (or Live account if the keys are from a live one) and press Save keys.
- Wait for Saved: Alpaca accepted the keys. The section then says whether your data is IEX (the free plan) or SIP (a paid Alpaca data plan).
- Back on the chart, search for a stock (
AAPL,SPY). Stocks marked as your Alpaca data open straight away.
What you get#
- Every US stock and ETF Alpaca lists, history back to 2016, and live prices.
- On the free plan, live prices and today’s volume come from one exchange (IEX), so volume looks smaller than the whole market’s; history older than 15 minutes is consolidated (SIP).
- Alerts and paper trading on your stocks, read with your keys.
If it doesn’t work#
- Alpaca refused the keys: the key ID and secret must be a pair from the same account, and the account choice must match (paper keys with Paper account). Generating new keys in Alpaca stops the old ones: paste the new pair.
- A stock says it needs your keys after you saved them: press Check again in the section, then reload the chart.
- Volumes look low: that’s IEX on the free plan, not missing data.
Note:Your keys are stored encrypted and used only for your charts, alerts and paper trades. Remove deletes them. See where each market’s data comes from.
TradingView and Pine Script are trademarks of TradingView, Inc. OpenTapefolio is not affiliated with or endorsed by TradingView.