Brokers
Alpaca

Alpaca Setup

Alpaca is the simplest broker to connect to Ordertune. It uses API key authentication — no local gateway software required. Alpaca supports both paper trading (simulated) and live trading.

Start with paper trading to verify your setup before switching to a live account.


Requirements


Paper Trading Setup

Create Your Alpaca Account

Go to alpaca.markets (opens in a new tab) and sign up. You do not need to fund the account to use paper trading.

Switch to Paper Trading

In the Alpaca dashboard, ensure you are in the Paper Trading environment. Look for the toggle in the top-right corner of the Alpaca dashboard — it should show Paper mode.

Generate API Keys

Go to Paper Trading → API Keys in the left sidebar. Click Regenerate (or Generate if this is your first time). A dialog shows your:

  • API Key ID — begins with PK for paper keys
  • Secret Key — shown only once; copy it immediately

Connect in Ordertune

  1. Log in to platform.ordertune.com (opens in a new tab)
  2. Open Settings (gear icon, top right)
  3. Go to the Broker tab
  4. Select Alpaca Paper from the broker dropdown
  5. Enter your API Key ID and Secret Key
  6. Click Connect

Verify the Connection

After connecting, click Test Connection. If successful, you will see your paper portfolio balance displayed. The broker status indicator turns green.

⚠️

Your Secret Key is shown only once in Alpaca's dashboard. If you lose it, you must regenerate your keys.


Live Trading Setup

Live trading follows the same steps as paper trading, with two differences:

  1. In Alpaca, switch to the Live Trading environment using the toggle in the top-right
  2. Go to Live Trading → API Keys and generate live keys (begin with AK)
  3. In Ordertune Settings, select Alpaca Live from the broker dropdown and enter your live keys
⚠️

Live keys interact with real capital. Verify your position size settings in Ordertune before submitting live orders.


API Endpoints

EnvironmentAPI Base URL
Paperhttps://paper-api.alpaca.markets
Livehttps://api.alpaca.markets

Ordertune selects the correct endpoint automatically based on whether you chose Alpaca Paper or Alpaca Live in settings.


Troubleshooting

"Invalid API key" error → Check that you copied both the Key ID and Secret Key correctly. Secret Keys are case-sensitive.

Balance shows $0 → Paper accounts start with a simulated $100,000. If your balance shows $0, confirm you are in Paper mode, not Live mode.

Orders not submitting → Check that your API keys have Trading permissions enabled in the Alpaca dashboard.