Connecting Alpaca

Connect Alpaca with API keys, choose between Alpaca's paper and live endpoints, and pick a data feed.

Alpaca is the simplest broker to connect: authentication is a pair of API keys, and Alpaca offers a paper-trading environment with its own keys. Through Alpaca, TigerTradeBot trades stocks, ETFs and crypto. Alpaca doesn’t offer options through TigerTradeBot; options go through Schwab or Webull.

Prerequisites

  • An Alpaca account at alpaca.markets. A paper-only account doesn’t need funding, so you can complete this guide without depositing money.

Paper keys vs. live keys

Alpaca runs two separate environments, and their keys are not interchangeable:

  • Paper keys come from Alpaca’s paper dashboard and control simulated money only.
  • Live keys come from the live dashboard and control real money.

Step 1: Generate keys

  1. Log in to the Alpaca dashboard and switch to the paper environment.
  2. Generate an API key pair and copy the Key ID and the Secret Key. Alpaca shows the secret once; if you lose it, regenerate.

Step 2: Enter the keys

  1. Open Settings → Global Configuration → Brokers & Data, section Alpaca.
  2. Paste the Key ID into Alpaca API Key and the secret into Alpaca API Secret.
  3. Leave Paper Trading on true (the default) for paper keys. false uses Alpaca’s live endpoint and needs live keys.
  4. Choose a Data Feed: iex is Alpaca’s free feed; sip needs a paid Alpaca data subscription.
  5. Choose Save Settings, then Test Alpaca.

Step 3: Point an instance at Alpaca

In Settings → Instance Configuration → Trading, set Broker Focus to Alpaca (stocks) or Alpaca (crypto).

Two ways to paper trade with Alpaca:

  • Bot Mode Paper: the built-in simulator fills your orders and nothing is sent to Alpaca.
  • Bot Mode Live with Paper Trading = true: orders go to Alpaca’s paper environment and fill against Alpaca’s paper account. This still needs a license that allows live trading.

Going live (later)

When you’ve run your strategy on paper long enough to trust it: generate live keys, enter them, set Paper Trading to false, and switch the instance to Live. That needs a license that allows live trading and a confirmation step.

Note: Regenerating keys in the Alpaca dashboard invalidates the old pair immediately. If Test Alpaca suddenly fails, a key regeneration is the usual cause: paste the new keys.

Trading involves substantial risk of loss and is not suitable for every investor. Start on paper.