Alpaca trading: run tested strategies in Alpaca

Alpaca is a US broker that lets software place trades through an API. An API is a way for one program to talk to another. Tactfolio connects to your Alpaca account with your own API keys and runs one of your strategies there, on paper or with real money.

  • Test a strategy on decades of daily prices first, then run the same rules in Alpaca.
  • Use an Alpaca paper account to practice, or a live account for real orders.
  • Each strategy trades only the starting balance you give it. Your other holdings in Alpaca stay untouched.
  • Tactfolio never uses margin or short selling, even though Alpaca offers both.
  • You don’t write code. You build the rules in a visual builder, or with an AI assistant.

Open the builderFree while we build. Look around without an account.

The rules of a public strategy as a tree: an If block checks whether SPY’s 12-month return beats BIL’s, a Rank block holds the stronger of SPY and VEU, and the Else branch holds AGG.
Every strategy’s rules are a tree you can read, block by block.

What is Alpaca trading?#

Alpaca trading means placing orders in an Alpaca brokerage account, usually through its Trading API instead of a trading screen. Alpaca offers paper accounts with pretend money and live accounts with real money. It also lets you buy fractions of a share, from about $1.

Most people who trade through Alpaca write their own code. Tactfolio gives you another way. You build a strategy, test it, and let Tactfolio send the orders to Alpaca for you.

How to connect Alpaca to Tactfolio#

  1. Build or copy a strategy. Use the builder, a classic strategy, or a strategy from Discover.
  2. Test it. Read the backtest, the drawdown, and the reality checks. Then run it in a Tactfolio paper account if you like.
  3. Create API keys in Alpaca. Make keys for a paper account first. You can use live keys later.
  4. Add an Alpaca account in Trade. Paste your keys and set the starting balance for the strategy. It must fit in the account’s cash.
  5. Start trading. From the next session, Tactfolio checks the rules about 15 minutes before the close and sends orders to Alpaca when they call for a change.

Tactfolio warns you before you start if a holding’s weight would make an order smaller than Alpaca’s $1 minimum.

What Tactfolio does inside your Alpaca account#

Tactfolio keeps its own record for each strategy: its cash, its orders, and its shares. That record decides every trade.

Tactfolio willTactfolio won’t
Trade only the starting balance you give the strategySell your other holdings to raise money
Sell only the shares the strategy itself boughtTouch positions it did not open
Rebalance on the strategy’s current valueChange your Alpaca account settings
Cancel only its own ordersBorrow on margin or sell short

Say you give a strategy $5,000 in an account that also holds other stocks. The strategy trades with that $5,000 and whatever it earns. If it grows to $5,200, it rebalances $5,200. Your other stocks are never part of it.

Paper or live: which Alpaca account to use#

Start with paper. An Alpaca paper account fills pretend orders at real quotes, so you can check that everything works before real money is at stake. Alpaca’s own paper trading guide notes that live orders can still behave differently.

When you switch to live, the strategy places real orders with real money. Its results can differ from the backtest and from paper, because prices move and orders may fill at worse prices.

What Tactfolio does and does not do#

Tactfolio doesTactfolio does not
Run your strategy in your own Alpaca account, paper or liveWork with any broker other than Alpaca
Check rules once a trading day, near the closeTrade during the day or at high speed
Trade US-listed stocks and ETFs, long onlyTrade crypto, options, or forex in Alpaca
Keep each strategy to its own starting balanceHold your money. It stays with Alpaca
Email you a summary after each closeGive advice or manage money for you

Try it on Tactfolio#

Open the builder and pick a starter pattern or a classic. Test it, start it in a Tactfolio paper account, and watch it for a while. When you trust it, connect Alpaca. Our page on automated trading explains what happens each day after that.

Open the builderFree while we build. Look around without an account.

Keep learning#

Common questions#

Is Alpaca free to use with Tactfolio?#

Tactfolio is free while we build. Pricing comes with live trading. Alpaca sets its own fees and account rules, so check them on Alpaca’s site.

Do I need to code to trade on Alpaca?#

Not with Tactfolio. You build the rules in a visual builder or with an AI assistant. Tactfolio places the orders through Alpaca’s API for you.

Can I use an Alpaca paper account?#

Yes. Connect Alpaca paper keys to test with pretend money and real quotes. You can also use a Tactfolio paper account, which needs no broker at all.

Will Tactfolio touch my other Alpaca positions?#

No. A strategy only trades its own starting balance and the shares it bought. It never sells anything else you hold.

Does Tactfolio trade crypto on Alpaca?#

No. Alpaca offers crypto, but Tactfolio strategies trade only US-listed stocks and ETFs in Alpaca. Tactfolio’s crypto support is Hyperliquid perps, and those are backtest and paper or testnet only.

Sources