# Connect Alpaca

> Connect an Alpaca paper account in Settings so the Trade app can place paper orders with it, then check it, sync it, reconnect it or disconnect it.

Source: https://orbitalaip.com/docs/trade/connect-alpaca

> [!IMPORTANT] Disclaimer
> Backtest results are hypothetical and do not predict future performance. Nothing here is investment advice: Orbital computes the rules you supplied and recommends nothing. Orbital is not a registered investment adviser or broker-dealer. Costs are as modelled by the chosen cost profile and may differ from live trading.

## What connecting does

Trade places its orders on an Alpaca paper account, which you connect as the plugin named **Alpaca**. Orbital does not take API keys: you sign in at Alpaca and approve access. Alpaca is the only broker Trade can use; the other brokers in **Browse** are marked **Coming soon**.

Only paper accounts are connected, and no real money moves. See [paper trading](https://orbitalaip.com/docs/glossary#paper-trading).

A connection belongs to the workspace and is shared by everyone in it. Only workspace owners and admins can connect or change plugins. Alpaca paper trading is on every plan.

## Connect a paper account

1. **Open Plugins**
   
   Click your avatar at the bottom of the sidebar and choose **Plugins** under **Workspace**.

2. **Find Alpaca**
   
   If the page opens on **Connected**, click **Browse**. Under **Brokers**, click **Connect** on the **Alpaca** card.

3. **Read the notice**
   
   A page headed **Connect Alpaca** shows Alpaca's notice, titled **Authorize Orbital AI**, and the line "Paper trading only. This connects an Alpaca paper account; no real money moves."

4. **Continue to Alpaca**
   
   Click **Continue to Alpaca**, then sign in at Alpaca and approve the request.

5. **Come back connected**
   
   Alpaca returns you to **Plugins**, and a message says **Alpaca connected**. The Alpaca page opens with the status **Connected**, and the first sync of the account starts.

## After connecting

The **Connected** tab lists **Alpaca** with the paper account number and the time of the last sync. The arrow at the end of the row opens the Alpaca page, with **Sync now** and **Check connection**.

In Trade, the account appears as a tab named **Alpaca** with a masked account id and a **PAPER** chip. Deploying to it is covered in [Deploy a strategy](https://orbitalaip.com/docs/trade/deploy-a-strategy).

An account connected for the first time starts with order sending turned off. You can save a deployment to it, but it cannot place orders until sending is enabled. Settings and Trade have no switch for it, so [contact us](https://orbitalaip.com/contact) to turn it on.

## Check and sync

**Check connection** asks Alpaca for the account. A working answer adds **Equity** and **Buying power** to the **Account** section and clears an earlier error. If Alpaca refuses the credential, the connection is marked **Needs attention**.

**Sync now** reads the account's balances and positions again. A sync also runs when you connect, and there is no scheduled sync.

## Reconnect in place

A connection Alpaca stops accepting, or one whose sync failed, shows **Needs attention** with the reason under the row. If **Sync now** or **Check connection** then works, the status clears. Otherwise, reconnect it. **Reconnect** re-grants the same connection instead of adding one, so the account number, the [deployments](https://orbitalaip.com/docs/glossary#deployment) running on it and its order history stay with it.

1. **Click Reconnect**
   
   It is on the Alpaca row under **Connected** and on the Alpaca page.

2. **Read the notice**
   
   The **Connect Alpaca** page opens again. Click **Continue to Alpaca**.

3. **Sign in with the same Alpaca account**
   
   Approve the request. A different account is refused: "That's a different Alpaca account from the one this plugin uses. Sign in with that account to reconnect, or connect the other one as a new plugin."

To add a second paper account, use **Connect another** on the Alpaca page instead.

Only a workspace owner or admin can reconnect. Anyone else who opens the page sees the error, but no **Reconnect**.

## Disconnect

Disconnecting removes Orbital's stored credential and the connection. Connections never go to **Trash**.

1. **Find Disconnect Alpaca**
   
   On the Alpaca page, the row reads "Syncing stops, and Trade can't send orders to this account until you reconnect."

2. **Click Disconnect**
   
   The confirmation asks you to cancel any open orders in Trade first.

3. **Confirm with Disconnect Alpaca**
   
   A message says **Alpaca disconnected**: "Its order history is kept; reconnect the same account to pick it up again."

4. **Remove Orbital AI at Alpaca**
   
   Remove it under your Alpaca account's connected apps, since Alpaca offers no way to do it from Orbital.

Open positions and running deployments do not block a disconnect. A deployment left without its account cannot send orders, so pause or stop it first if that is what you want; see [Manage a deployment](https://orbitalaip.com/docs/trade/manage-a-deployment).

### The open-orders guard

Orbital refuses to disconnect while the account has open orders at Alpaca, because the credential being removed may be the only one that can cancel them. The refusal begins "Alpaca still has open orders on this account."

Cancel them first, then disconnect. In Trade, the account's **⋯** menu has **Cancel all open orders**, noted "Includes exits, so positions lose their stops."

The guard passes when Alpaca no longer accepts the credential, or when another **Connected** connection in this workspace holds the same account. Orbital also keeps the connection while an order it sent is still being confirmed, or when it can't reach Alpaca to check. Try again in a few minutes.

## If connecting fails

Alpaca's return to Orbital can end in a message titled **Could not connect Alpaca**. The line under it says why.

| Message | What to do |
| --- | --- |
| You declined access on the Alpaca screen. Nothing was connected. | Start again from the Alpaca card and approve the request. |
| That connect link had expired. Start again from this page. | Start again from Plugins. The same applies to a link that had already been used. |
| Alpaca refused the final step. Try connecting again. | An Alpaca row marked Needs attention now sits under Connected. Click Reconnect on it and try again. |

If Alpaca isn't set up on Orbital's side, the line reads "Alpaca is not enabled on this deployment yet." A failure before Alpaca's site opens shows **Could not start the connect flow** instead. If it keeps failing, [contact us](https://orbitalaip.com/contact).
