Alpaca trading journal
Commission-free equity fills over one of the cleanest broker APIs we integrate with. Options do not sync today.
About this integration
Alpaca pioneered the developer-friendly broker model. Their REST API is well-documented, rate-limits are generous, and the OAuth flow Just Works. If you're algorithmic-leaning or building your own analytics on top of TFQ data, Alpaca is the broker we recommend connecting first.
Supported instruments
Access scope
TFQ makes exactly one Alpaca data call — `/v2/account/activities`, filtered to fills. It never reads your positions, your balances, or your open orders. The token Alpaca issues us is far broader than that one call: we request `account:write trading data`, so the grant itself carries trading authority. TFQ contains no order-placement code, but that limit is ours, not Alpaca's.
What we read is limited by our code, not by Alpaca. TradeFlow Quantum has no order-placement code path and we do not intend to add one — but because the granted token carries trade permission, treat a compromise of TFQ as reaching this brokerage connection. If that is not an acceptable risk, use the CSV import instead of connecting.
Setup
- 1System → Brokers → Connect Alpaca
- 2You're redirected to Alpaca to authorize TradeFlow Quantum
- 3Approve the scope on Alpaca's authorization page — read the scope list; it includes trading
- 4Redirected back to TFQ — click Sync on the brokers page to pull your last 90 days of trades
- 5Going forward, click Sync whenever you want new trades pulled in — TFQ does not sync in the background
Known limitations
- !Paper and live are separate Alpaca API hosts, and which one this deployment connects to is a server-level setting — not a per-account choice at connect time.
- !Crypto trades on Alpaca's crypto product (separate from equities) require a separate OAuth flow we do not support today. CSV import is the workaround.
- !Option fills are dropped by the sync, not imported. `isOptionContractSymbol` in lib/brokers/alpaca.ts filters them out before pairing, because the API sync builds its rows outside the CSV route's pairing and stamps no option multiplier of its own, so an option priced through it lands in the journal at 1/100th of its real P&L. There is no Alpaca CSV preset, so an upload lands on the generic mapping, which reads P&L straight from the file only if the export carries a column that preset recognises (P&L, PnL, Realized, Profit, P/L, Net P/L); without one, P&L is derived by pairing fills and the contract multiplier is read off the symbol: an option row whose symbol cell carries the full contract code (“AAPL 240315C00180000”, padded or not) imports at ×100, while one carrying only the underlying ticker imports at 1/100th. The SnapTrade Alpaca connection records the ×100 — that is the options path, or log them by hand.
How the Alpaca connection syncs
- Authorization
- OAuth 2.0 authorization-code flow via app.alpaca.markets/oauth/authorize.
- API host
- api.alpaca.markets for live accounts, paper-api.alpaca.markets for paper accounts.
- Data endpoint
- GET /v2/account/activities filtered to activity_types=FILL.
- Pagination
- A page_token cursor set to the last row's id, 100 fills per page, until a short page comes back.
- Round-trip pairing
- FIFO per symbol. A buy or sell_short opens a position; a sell or buy_to_cover closes the oldest matching one.
Alpaca import caveats
- —One sync reads at most 10,000 fills (100 pages of 100). A history longer than that stops at the ceiling rather than looping — the cap exists so a misbehaving response can't spin forever.
- —Paper and live accounts answer on different API hosts. A connection is bound to one of them — the environment is stored on the connection at connect time and every later request uses that host.
Why use TradeFlow Quantum instead of Alpaca's built-in tools?
- ✓Cross-broker view. If you trade Alpaca plus any other broker, TFQ unifies the equity curve, P&L attribution, and mistake-checker across all of them.
- ✓Mistake-checker on YOUR data — surfaces patterns in your Alpaca history (time-of-day, setup type, emotional state) the broker won’t show you.
- ✓Long-term data ownership. Alpaca’s built-in analytics typically limit history to 90 days or 1 year. TFQ keeps every trade for as long as your account exists, exportable any time — closed trades as CSV, everything including open positions as a JSON backup.
Connect Alpaca in 60 seconds
7-day free trial. Card required at signup. Connect Alpaca as your first broker on the dashboard.
Other brokers
Browse all supported brokers →Alpaca is a registered trademark of its respective owner. We’re not affiliated with Alpaca. Their site: alpaca.markets. Last verified: 2026-06.