Skip to main content

Connecting Your Broker

UTM supports multiple brokers for trading. This guide covers how to connect each one.

Supported Brokers​

BrokerConnection TypeFeatures
TradeStationCloud APIFull trading, market data, streaming
AlpacaCloud APIFull trading, market data

TradeStation​

TradeStation connects via OAuth 2.0 for secure API access.

Prerequisites​

  • Active TradeStation account (live or paper)
  • TradeStation API access enabled

Connection Steps​

  1. Go to Brokers in the UTM sidebar
  2. Click Connect Broker and select TradeStation
  3. You'll be redirected to TradeStation's login page
  4. Log in and authorise UTM to access your account
  5. Select which accounts to sync
  6. Click Complete Setup

Account Types​

UTM supports both live and paper (simulation) accounts:

  • Live accounts - Real trading with real money
  • Paper accounts - Simulated trading for testing
Trading Mode

UTM displays your current trading mode (PAPER/LIVE) in the header. Make sure you're in the correct mode before placing orders.

Alpaca​

Alpaca connects via API keys for automated trading.

Prerequisites​

  • Alpaca account (live or paper)
  • API keys generated in Alpaca dashboard

Connection Steps​

  1. Log in to your Alpaca account at alpaca.markets
  2. Go to API Keys and generate a new key pair
  3. In UTM, go to Brokers > Connect Broker > Alpaca
  4. Enter your API Key and Secret Key
  5. Select environment (Live or Paper)
  6. Click Connect

Paper vs Live​

Alpaca provides separate environments:

  • Paper - Uses paper-api.alpaca.markets
  • Live - Uses api.alpaca.markets

Your API keys are specific to each environment.

Managing Connections​

Viewing Connected Brokers​

Go to Brokers to see all connected broker accounts:

  • Connection status (connected, disconnected, error)
  • Last sync time
  • Number of accounts

Syncing Data​

UTM automatically syncs:

  • Positions
  • Orders
  • Account balances
  • Trade history

Click the Sync button to manually refresh data.

Disconnecting a Broker​

  1. Go to Brokers
  2. Click the broker you want to disconnect
  3. Click Disconnect
  4. Confirm the disconnection
warning

Disconnecting a broker will:

  • Stop syncing positions and orders
  • Prevent new orders through that broker
  • Keep historical data in UTM

Troubleshooting​

TradeStation​

"Token expired" error

  • Re-authorise UTM from the Brokers page
  • TradeStation tokens expire after extended inactivity

Missing accounts

  • Ensure all accounts are selected during authorisation
  • Re-connect and check account permissions

Alpaca​

"Invalid API key" error

  • Verify you're using the correct environment (paper vs live)
  • Check that keys haven't been revoked
  • Generate new keys if needed

"Your Alpaca connection has stopped working" notification

When UTM sees three consecutive HTTP 401 responses from Alpaca for the same account, it marks the account credentials invalid and pauses syncing for that account so we stop hammering the broker. You will see a "Re-link account" banner on the broker card and an in-app notification.

To recover:

  1. Open the Brokers page.
  2. Find the affected Alpaca account on the broker card.
  3. Click "Re-link account" and enter fresh API key and secret.
  4. UTM tries the new credentials immediately. On success the account flips back to valid and sync resumes on the next cycle.

While an account is in the invalid state, UTM does not place new orders through it and the periodic sync does not call Alpaca for it. Other accounts under the same broker continue to work normally.