Connecting Your Broker
UTM supports multiple brokers for trading. This guide covers how to connect each one.
Supported Brokers
| Broker | Connection Type | Features |
|---|---|---|
| TradeStation | Cloud API | Full trading, market data, streaming |
| Alpaca | Cloud API | Full trading, market data |
| Interactive Brokers | Desktop App | Full trading via local connection |
TradeStation
TradeStation connects via OAuth 2.0 for secure API access.
Prerequisites
- Active TradeStation account (live or paper)
- TradeStation API access enabled
Connection Steps
- Go to Brokers in the UTM sidebar
- Click Connect Broker and select TradeStation
- You'll be redirected to TradeStation's login page
- Log in and authorise UTM to access your account
- Select which accounts to sync
- 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
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
- Log in to your Alpaca account at alpaca.markets
- Go to API Keys and generate a new key pair
- In UTM, go to Brokers > Connect Broker > Alpaca
- Enter your API Key and Secret Key
- Select environment (Live or Paper)
- 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.
Interactive Brokers
Interactive Brokers connects through the UTM Desktop App for local connectivity.
Prerequisites
- Interactive Brokers account
- TWS (Trader Workstation) or IB Gateway installed
- UTM Desktop App installed
Connection Steps
- Download the UTM Desktop App
- Install and launch the desktop app
- Log in with your UTM account
- Start TWS or IB Gateway and log in
- In UTM Desktop, click Connect to IB
- Configure the connection port (default: 7497 for TWS paper, 7496 for live)
- Accept the API connection in TWS
Desktop App Features
The UTM Desktop App provides:
- Direct local connection to IB (no cloud routing)
- Automatic sync with the UTM cloud platform
- Real-time position and order updates
- Local data caching for reliability
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
- Go to Brokers
- Click the broker you want to disconnect
- Click Disconnect
- Confirm the disconnection
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
Interactive Brokers
"Cannot connect to TWS"
- Ensure TWS/Gateway is running and logged in
- Check API settings in TWS (Edit > Global Configuration > API)
- Verify the port number matches UTM Desktop settings
- Allow API connections in TWS settings
Desktop App not syncing
- Check internet connection
- Verify you're logged in to UTM
- Check the connection status indicator