Automated Trading With Alpaca: How It Works

By Susan McCarthy — Partner, Private Equity Investments · Published October 14, 2026 · 7 min read

Automated trading with Alpaca means a piece of software sends buy and sell orders to your Alpaca brokerage account for you, following fixed rules. With AlgolaneBots, you connect by signing in on Alpaca's own page and approving limited permissions: the software can place trades and read your positions, but it cannot move or withdraw money. Your cash and shares stay at Alpaca the whole time.

This guide walks through what Alpaca is, how the connection works, what happens on a normal trading day, and what to check before switching from paper to real money.

What Alpaca is

Alpaca is a US brokerage built around an API, which is a way for software to talk to the broker directly instead of through buttons on a screen. It offers trading in US stocks and exchange-traded funds, and it is widely used by developers and by services that automate trading. Like any broker, it holds the customer's account, executes orders on exchanges and keeps records of positions and cash.

Alpaca offers two kinds of accounts that matter here:

  • Paper accounts, which simulate trading with pretend money against real market prices.
  • Live accounts, which trade real money.

Both can be connected to automated software. That makes Alpaca a common choice for testing a bot's connection on paper first and then moving to live once everything has been checked.

Two ways software can connect to a broker

There are two broad ways a trading tool can get access to a brokerage account. The difference matters a lot for safety.

API keys OAuth sign-in
How it works You copy a key and secret from the broker and paste them into the tool You sign in on the broker's own page and approve access
Who sees your password Nobody, but the keys act like a password Only the broker
What access is granted Whatever the keys allow The specific permissions shown on the approval screen
How to revoke Delete the keys at the broker Revoke the app's access at the broker
Risk if the tool is breached The keys could be misused until deleted The approved permissions could be misused until revoked

AlgolaneBots uses OAuth for Alpaca. You never type your Alpaca password into our site, and we never see it. You approve access on Alpaca's page, and Alpaca gives us a token that carries only the permissions you approved. For a wider look at these questions, see our post on whether it is safe to connect a bot to your broker.

Connecting step by step

Here is what the connection looks like from your side:

  1. Open a AlgolaneBots account and run the strategies on our own $10,000 paper account first, if you like. That needs no broker at all.
  2. Choose to connect Alpaca from your account. You can pick a paper or live Alpaca account.
  3. Sign in on Alpaca's page. The browser takes you to Alpaca, where you log in with your own details.
  4. Review and approve the permissions. AlgolaneBots asks to place trades and read positions. It does not get permission to move or withdraw money.
  5. Return to AlgolaneBots. The connection is now in place, and the four US strategies can run on it.

If you change your mind, the kill switch stops every broker order straight away.

What a normal trading day looks like

The four US strategies make their decisions on a schedule. Leveraged Growth and Market Switch check every trading day, Steady Growth checks on the first trading day of each week, and Big Tech Trend on the first trading day of each month. The table shows a typical day when a strategy is due to act.

Time (New York) What happens
After the previous close The strategy reads the latest closing prices and works out what it wants to hold
Early morning The order run starts and runs its safety checks
By 9:28am Orders must be sent; anything later is skipped for that day
9:30am, market open Alpaca sends the orders to the market and they fill at opening prices
During the day Positions are read back so your dashboard matches the broker

The 9:28am cutoff exists so that orders always aim at the opening price, which is the price the strategies were tested on. If something delays the run, it is safer to skip the day than to trade at a random time later in the session.

Which strategies run through Alpaca

Four of the five AlgolaneBots strategies trade US stocks and funds, and those are the ones that use Alpaca:

  • Leveraged Growth rotates daily between leveraged growth funds such as TQQQ and SOXL, bonds, volatility funds and inverse funds.
  • Market Switch holds one fund at a time, usually SPY, and switches to UVXY or leveraged funds when its signals fire.
  • Big Tech Trend holds technology leaders in healthy markets and moves toward bills, gold and defensive sectors in weak ones, deciding monthly.
  • Steady Growth reweights seven fixed names every week.

The fifth strategy, Gold Breakout, trades gold through a MetaTrader 5 advisor instead, which our MT5 setup guide covers.

Running a strategy through a broker does not change its risk. As one example, Steady Growth is the steadiest of the four in testing, and in a historical backtest from January 2011 to November 2026, a computer test on past prices that nobody earned, its worst fall was 20%, against 34% for the S&P 500 and 35% for the Nasdaq 100 over the same period. That fall happened in the Covid crash and recovered about a month after the bottom. Its caveat matters: the seven names were picked because they already did well, which flatters the test. Future results will differ, and the strategies that hold leveraged funds have had much deeper falls.

The checks before every order

Before any order goes to Alpaca, each order run checks a list of conditions. If one fails, that order is not placed.

  • Subscription. Real-money orders need an active subscription.
  • Consent. You must have agreed to live trading for that account.
  • Signal age. The signal must be fresh. A decision made from old prices is not acted on.
  • Time cutoff. Orders must go out before 9:28am New York time.
  • Tradability. Each fund must still be tradable at the broker. Funds are sometimes halted, delisted or restricted.
  • Split check. If a price gap looks like a stock split that the data has not caught yet, the run stops rather than trade on a wrong price.
  • Unique order IDs. Every order carries its own ID, so if a network problem causes a retry, Alpaca will not accept the same order twice.

Real-money orders also ask for your AlgolaneBots password, as an extra confirmation that you meant to switch on live trading. Our post on how a trading bot places orders safely explains why each of these checks exists.

Paper first, then live

There are two separate paper environments you might use, and they test different things.

Option What it tests What it does not test
AlgolaneBots paper account How the strategies behave with real prices, next-open fills and a 0.05% cost per fill Your broker connection
Alpaca paper account The full connection: OAuth, order sending, position reading Real-money fills and your own nerves
Alpaca live account Everything, with real money Nothing is simulated

The free 90-day trial covers paper trading. Live trading stays off until you subscribe ($29 a month, only if you choose to), consent and connect a live Alpaca account. Our paper-to-live checklist lists what to confirm before taking that step.

What can still go wrong

Automation removes some kinds of human error but not market risk or every technical risk. A few honest limits:

  • Opening prices can gap. Orders fill at the open, and prices can open well above or below the previous close after overnight news. The strategies were tested on next-open fills for this reason, but a gap can still hurt on any given day.
  • Strategies lose money. A careful connection does not make a strategy profitable. Each of the four US strategies has had deep falls in historical backtests, and the ones that hold leveraged funds can drop very quickly.
  • Broker outages. Any broker can have technical problems. Orders that cannot be sent before the 9:28am cutoff are skipped for that day rather than placed late.
  • Your own changes. If you trade by hand in the same account, the strategy's view of what it holds may not match reality. Using a dedicated account avoids confusion.

If something looks wrong, the kill switch stops every broker order at once. You can read more about it in our safety overview.

Related reading: trading bots for Robinhood: what works today, and the Interactive Brokers trading bot setup guide.

Key takeaways

  • Alpaca is an API-first US broker with paper and live accounts, which makes it suited to automated trading.
  • AlgolaneBots connects through OAuth: you sign in on Alpaca's own page, and the access allows placing trades and reading positions, never moving or withdrawing money.
  • Strategies decide after the close, orders go out before a 9:28am New York cutoff, and fills happen at the market open.
  • Every order run checks subscription, consent, signal age, tradability and suspected splits, and unique order IDs stop duplicate trades.
  • Live trading needs a subscription, explicit consent, a live account and your password; until then, everything stays on paper.

This is general information, not personal advice.

Start without a broker

You do not need an Alpaca account to see how the strategies behave. AlgolaneBots gives you a $10,000 paper account and a free 90-day trial with no card needed, and you can connect Alpaca whenever you are ready. Sign up and start on paper.

Where the numbers come from: every strategy figure is from AlgolaneBots's own historical backtests, run on past prices with the method on how we test. Nobody earned them, and future results will differ. General market facts are checked against regulator and company sources. This guide is general information, not personal advice. Read the risk disclosure and how we write our guides.

Keep reading

Brokers and setup · 7 min read · Eric Johansen

Interactive Brokers Trading Bot: Setup Guide

How an Interactive Brokers trading bot connects through IB Gateway on your own computer, with the login choices, API settings, ports and limits to know.

Brokers and setup · 7 min read · Elena Gomez

Trading Bot for Robinhood: What Works Today

Looking for a trading bot for Robinhood? What its official crypto API and AI agent beta allow, why unofficial bots are risky, and which brokers offer bot APIs.

Brokers and setup · 8 min read · Joseph Byrne

Paper to Live: A Checklist Before Real Money

Planning to switch from paper to live trading? Use this checklist to check your results, costs, broker setup, risk limits and exit plan before real money.