Back
Broker integration documentation

Alpaca Paper Trading

Overview

Sentimentor's first broker integration connects a user-owned Alpaca Paper account to an eligible PineNode live runner. The runner evaluates the frozen strategy on completed bars and can submit simulated orders to Alpaca's paper environment. This creates forward execution evidence after historical research; it does not turn a backtest into proof of future performance.

warn
Paper only today. Sentimentor never routes live brokerage orders through this integration and has no automatic fallback to a live endpoint. Live-money trading is planned for December 2026, with additional broker integrations to follow. Alpaca simulates paper fills, so prices, latency, liquidity, slippage and partial fills can differ materially from a live market.

Research validation and broker execution are separate controls. Discovery, rolling validation and the final lockbox assess a fixed historical configuration. Alpaca Paper then observes how that frozen configuration behaves on genuinely newer bars. Read the PineNode robustness documentation before activating a strategy.

Requirements

  • A separate Alpaca account with paper trading available and permission granted through Alpaca Connect.
  • A PineNode runner using a supported U.S. stock or ETF and long-only direction. Short selling, options, crypto, futures, forex and multi-asset portfolios are not eligible for broker execution.
  • A current protocol-v2 pass only when Validated evidence is selected. Exploratory runners may use Alpaca Paper at the user's discretion and remain exploratory.
note
Using Alpaca Paper balance does not validate a strategy. An exploratory result remains exploratory even when paper orders are submitted. Editing source code or changing an executable input after validation invalidates the previous proof and requires a new eligible validation result before Validated can be selected again.

Connect Alpaca Paper

  1. Open your profile menu and expand the root-level Broker Connections section.
  2. Choose Connect beside Alpaca Paper.
  3. Review the Sentimentor authorization disclosure and choose Sign in on Alpaca.
  4. Enter your credentials and approve access on Alpaca's site. Sentimentor never receives your password and forces the paper environment during this flow.
  5. After the redirect, confirm that the connection card shows the masked paper account and a connected status.
note
The card remains Not connected until you finish Alpaca sign-in, approve the requested access and return through Sentimentor's callback. If you already have an Alpaca browser session, Alpaca may show its authorization screen without asking for your password again.

Live Runner History checks broker status independently from the strategy list. Its connection card shows Checking connection while that request is pending and offers Connect Alpaca Paper only after the server confirms that no active connection exists. If the check is temporarily unavailable, choose Retry status; this does not remove or replace the saved authorization.

You can also connect from Live Runner History. Connecting an account does not activate a strategy and does not submit an order. It only makes Alpaca Paper available as an execution mode for eligible runners.

Activate a strategy

  1. Open a saved strategy in PineNode or My Strategies.
  2. Choose Exploratory simulation, or choose Validated when the exact strategy has a current protocol-v2 pass. Hover the disabled Validated option to see why it is unavailable.
  3. Add a supported U.S. equity symbol and turn on Use Alpaca Paper balance. This funding choice is independent from the evidence mode.
  4. Review the symbol, timeframe and parameter values. Alpaca Paper requires long-only direction.
  5. Set the maximum order notional, daily order limit and account-wide daily loss guard.
  6. Confirm activation, then open Live Runner History to verify the runner status.

You can also activate the same eligible saved strategy from PineNode CLI 1.3.1 withpn deploy --strategy "<cloud name or id>" --ticker <TICKER> --paper. The CLI and web UI share the same server-owned validation and final-lockbox gate; local source files cannot bypass it.

tip
Start with conservative paper limits. Paper trading is for testing system behavior, reconciliation and operational assumptions—not for estimating live fill quality.
note
Selecting Alpaca Paper never upgrades evidence quality. The server requires a matching protocol-v2 pass before it permits Validated, while explicitly exploratory Alpaca runners remain exploratory throughout their history.

How execution works

The scheduled runner evaluates only completed market-data bars. A new long entry signal can create a buy intent when the strategy does not already own its allocation. A sell signal is limited to the quantity attributed to that strategy; it cannot intentionally liquidate unrelated holdings in the paper account. Sentimentor submits market orders with day time-in-force.

Before contacting Alpaca, Sentimentor records a local order intent and assigns a deterministic client order ID. This makes a retry traceable and prevents the same completed-bar signal from intentionally creating duplicate orders. Accepted, partially filled, filled, rejected, expired and canceled states are reconciled back into the runner history.

note
If a submission times out or Alpaca returns an ambiguous server error, Sentimentor keeps the intent in a submitted state and blocks a new order for that signal until reconciliation determines what happened. This favors duplicate prevention over immediate retry.

Safeguards

ControlWhat it does
Maximum order notionalCaps the requested dollar value of an individual paper order.
Maximum orders per dayStops additional submissions after the runner reaches its configured daily count.
Account-wide daily loss guardPauses new broker submissions when the paper account breaches the configured loss threshold.
No pyramidingPrevents repeated buy signals from intentionally adding to an already owned strategy allocation.
Strategy-owned exitsLimits sell quantity to the position allocation tracked for that runner.
Failure pausePauses a runner after repeated broker failures so it cannot continue submitting blindly.
warn
Safeguards reduce operational risk; they do not guarantee profitability, prevent every broker-side event or replace supervision of the Alpaca paper account.

Monitor runners and orders

Open Live Runner History to review connection status, strategy executions and broker order history. Check the signal reason, requested quantity or notional, broker status, filled quantity, average fill price, timestamps and any rejection message. A simulated forward result and an Alpaca Paper order are different records: the former measures the runner's modeled behavior, while the latter reports the broker simulator's order lifecycle.

Review the Alpaca paper dashboard as the broker-side source of truth for open orders, positions and account restrictions. If a status remains submitted, wait for reconciliation before taking another action on the same signal. Repeated manual interventions can make the paper account diverge from Sentimentor's strategy-owned allocation.

Selecting an execution opens a focused price chart built from the runner's recent scheduled closing prices. The blue diamond identifies that execution's completed bar. Historical baseline entry and exit markers are hidden in this detail view so they are not mistaken for events from the selected run; switch to Backtest baseline for the full cached historical trade view. Dragging the chart navigator or zooming filters the displayed series and recalculates the visible price scale.

Disconnect or reconnect

Use Profile → Broker Connections, or the connection card in Live Runner History, to disconnect. Sentimentor pauses every active runner using that connection and destroys the stored access-token ciphertext. Disconnecting does not cancel an order already accepted by Alpaca and does not close a paper position. Review those directly in Alpaca before or after disconnecting.

Reconnecting establishes a new authorization, but it does not silently resume paused runners. Review their configuration and broker state, then resume each runner deliberately. If encryption keys were rotated or Alpaca access was revoked, reconnecting is also the recovery path.

Security and data handling

Authorization occurs server-side through OAuth. PineNode strategy code and the browser never receive the Alpaca access token. Sentimentor stores the token encrypted at rest together with a masked account identifier and connection state. It also records order intents, broker IDs, status events and simulated fills so actions can be reconciled and audited.

OAuth state is single-use and time-limited, and redirect destinations are restricted to local application paths. The integration forces the Alpaca paper environment both when authorization begins and when orders are submitted. For the full data-use description, read the Privacy Policy.

Troubleshooting

  • Connect is unavailable: confirm that you are signed in and that Alpaca Paper is configured for the deployed environment.
  • Connection check does not complete: wait for the independent broker-status request, then use Retry status. A temporary status error does not mean the account was disconnected.
  • No Alpaca sign-in opens: read the error retained in the authorization dialog. Refresh the app and retry; deployment configuration must contain the OAuth client ID, secret, exact callback URI and token-encryption key.
  • Alpaca skips the login form: an existing Alpaca browser session can take you directly to the authorization screen. Review the account and requested access before approving.
  • Still not connected after returning: confirm that authorization was approved, the Alpaca Connect app is enabled for the account, and its registered callback exactly matches https://auth.sentimentor.ai/api/broker/alpaca-paper/callback.
  • Activation is rejected: verify connection status, available web Paper-runner capacity, supported asset, long-only rules and risk limits. A current final-lockbox proof is required only for Validated; PineNode CLI deployment remains validation-gated and additionally requires Elite or Trader.
  • Trading blocked: open Alpaca and resolve the paper account restriction before retrying.
  • Order is rejected: inspect the broker message, buying power, symbol eligibility, market status and configured limits.
  • Order remains submitted: do not repeatedly reactivate or duplicate the signal. Allow reconciliation to resolve an ambiguous response.
  • Runner paused: review recent order failures and connection health, fix the underlying issue, then resume deliberately.
  • Balances differ: refresh Live Runner History and compare with Alpaca. Manual broker activity may cause allocation differences.

Current limitations

  • Alpaca Paper is the only supported broker execution destination today; additional broker integrations are planned.
  • Live trading is not supported today; it is planned for December 2026.
  • Execution is limited to long-only PineNode runners for supported U.S. equities and ETFs. Exploratory Paper execution is permitted only as explicitly labelled exploratory evidence.
  • Orders are market/day only; limit, stop, bracket and extended-hours orders are not available through Sentimentor.
  • CLI activation requires a saved cloud strategy and cannot bypass the server-owned validation and lockbox proof.
  • Paper fills are simulations and should not be presented as live performance.
Continue with the PineNode guide or manage execution in Live Runner History.