Broker Health
The Broker Health feature in XeroLite provides real-time monitoring of your Interactive Brokers (IB) connection status. It displays connection information for each configured broker, including account numbers and account types, helping you quickly verify that XeroLite is properly connected to TWS or IB Gateway.
Overview
Broker Health shows:
- Real-time connection status for each broker
- Account numbers linked to each broker
- Account types (e.g., Paper Trading, Live Account)
- Visual status indicators (connected/disconnected)
- Error messages and troubleshooting tips when connection fails
Accessing Broker Health
Broker Health is located in the left sidebar of the XeroLite interface:
- Log in to XeroLite
- Look at the left sidebar (if collapsed, click to expand)
- Find the Broker Health section at the top of the sidebar
- Connection status is displayed automatically
Understanding Broker Health Display
Expanded View
When the sidebar is expanded, Broker Health shows:
Overall Status Header
- Connection Icon: Visual indicator (connected/disconnected image)
- Status Badge: Colored dot indicator:
- 🟢 Green: All brokers connected
- 🟡 Yellow: Some brokers connected (partial connection)
- 🔴 Red: All brokers disconnected
- Status Text: "Connected" or "Disconnected"
Individual Broker Information
For each configured broker, you'll see:
- Broker Name: Name of the broker connection
- Account Numbers: List of account numbers linked to this broker
- Connection Status Badge:
- 🟢 "Connected" (green badge) - Broker is online and ready
- 🔴 "Disconnected" (red badge) - Broker is offline
- Account Type Badge: Account type (e.g., "PAPER", "LIVE", "N/A")
- Info Icon (ℹ️): Hover to see detailed connection information or error messages
Collapsed View
When the sidebar is collapsed, Broker Health shows a compact view:
- Small Icon: Connection/disconnection image
- Status Dot: Colored indicator in the corner:
- 🟢 Green: All connected
- 🟡 Yellow: Partial connection
- 🔴 Red: All disconnected
- Tooltip: Hover to see "IBKR connected" or "IBKR disconnected"
Status Indicators
Connection Status Colors
| Color | Meaning | Description |
|---|---|---|
| 🟢 Green | All Connected | All brokers are online and ready to receive orders |
| 🟡 Yellow | Partial Connection | Some brokers are connected, but not all |
| 🔴 Red | Disconnected | All brokers are offline or connection failed |
Status Badges
- "Connected" (Green Badge): Broker is online and ready
- "Disconnected" (Red Badge): Broker is offline or connection failed
Understanding Account Information
Account Numbers
Broker Health displays all account numbers linked to each broker:
- Multiple Accounts: If a broker has multiple accounts, all are listed
- Account Format: Account numbers are displayed exactly as configured in TWS
- Finding Account Numbers: Use Broker Health to find account numbers for use in alert requests (see Multi-Account Support)
Account Types
The account type badge shows:
- PAPER: Paper trading account (for testing)
- LIVE: Live trading account (real money)
- N/A: Account type not available or not detected
Error Messages and Troubleshooting
Common Error Messages
When you hover over the info icon (ℹ️) next to a disconnected broker, you may see:
"Enable ActiveX and Socket Clients" Error
Error Message: "Couldn't connect to TWS/IB Gateway."
Solution:
- Open TWS or IB Gateway
- Go to Edit → Global Configuration... → API → Settings
- Ensure "Enable ActiveX and Socket Clients" is checked ✅
- Set the connection port to 7497 (for paper trading) or 7496 (for live trading)
- Click OK to save
- Restart TWS/IB Gateway
- Check Broker Health again
Connection Failed
Error Message: "Connection failed"
Possible Causes:
- TWS/IB Gateway is not running
- Wrong port number configured
- Firewall blocking connection
- XeroLite cannot reach TWS/IB Gateway
Solutions:
-
Verify TWS/IB Gateway is Running:
- Ensure TWS or IB Gateway is open and logged in
- Check that it's not minimized or hidden
-
Check Port Configuration:
- Verify the port in TWS matches XeroLite's connection settings
- Default ports: 7497 (paper), 7496 (live)
-
Check Firewall:
- Ensure firewall allows connections on the configured port
- Add XeroLite and TWS to firewall exceptions if needed
-
Verify Network:
- Ensure XeroLite and TWS are on the same machine or network
- Check for network connectivity issues
-
Restart Services:
- Restart TWS/IB Gateway
- Restart XeroLite
- Check Broker Health again
Using Broker Health
Monitoring Connection Status
-
Check Status Regularly:
- Monitor Broker Health before placing orders
- Verify connection is green before trading
- Watch for status changes during trading sessions
-
Before Placing Orders:
- Ensure Broker Health shows "Connected" (green)
- Verify the correct broker is connected
- Check that account numbers are displayed correctly
-
Troubleshooting Connection Issues:
- Click the info icon (ℹ️) to see error details
- Follow the troubleshooting steps in the tooltip
- Refer to Connect XeroLite to IB for setup instructions
Finding Account Numbers
Broker Health is a quick way to find account numbers:
- Expand the sidebar (if collapsed)
- Look at the Broker Health section
- Find your broker in the list
- Note the account numbers displayed under the broker name
- Use these account numbers in alert requests with the
acc_nofield (see Multi-Account Support)
Multiple Broker Support
Understanding Multiple Brokers
XeroLite supports connecting to multiple brokers simultaneously:
- Different TWS Instances: Connect to different TWS/IB Gateway instances
- Different Accounts: Each broker can have different account numbers
- Independent Status: Each broker's connection status is monitored independently
Status Indicators for Multiple Brokers
- All Connected (🟢 Green): All brokers are online
- Partial Connection (🟡 Yellow): Some brokers connected, some disconnected
- All Disconnected (🔴 Red): No brokers are connected
Best Practices
- Monitor All Brokers: Check status of all brokers before trading
- Verify Correct Broker: Ensure orders are routed to the intended broker
- Account Verification: Double-check account numbers match your expectations
Troubleshooting
Broker Health Shows Disconnected
Problem: Broker Health always shows "Disconnected" even when TWS is running
Solutions:
- Verify TWS/IB Gateway is running and logged in
- Check API settings in TWS (Enable ActiveX and Socket Clients)
- Verify port number matches (7497 for paper, 7496 for live)
- Check XeroLite connection settings
- Restart both TWS and XeroLite
- Review Connect XeroLite to IB guide
Account Numbers Not Displayed
Problem: Broker Health shows connected but no account numbers
Solutions:
- Verify TWS is properly logged in with account access
- Check that accounts are properly linked in TWS
- Restart TWS and XeroLite
- Verify account permissions in TWS
Status Changes Frequently
Problem: Connection status flickers between connected and disconnected
Solutions:
- Check network stability
- Verify TWS is not being restarted automatically
- Check for firewall or antivirus interference
- Review TWS connection logs
- Ensure stable network connection
Wrong Account Type Displayed
Problem: Account type shows "N/A" or incorrect type
Solutions:
- This is usually informational only and doesn't affect functionality
- Verify account type in TWS directly
- Account type detection may vary by TWS version
Related Documentation
- Connect XeroLite to IB - Initial connection setup
- Configure IB TWS for API Access - API configuration
- Verify IB Connection - Connection verification
- Multi-Account Support - Using account numbers in alerts
- Troubleshooting - General troubleshooting guide
Summary
Broker Health provides essential connection monitoring:
- ✅ Real-time connection status for all brokers
- ✅ Account numbers and account types display
- ✅ Visual status indicators (green/yellow/red)
- ✅ Error messages with troubleshooting tips
- ✅ Support for multiple brokers
- ✅ Quick access to account information
Always check Broker Health before placing orders to ensure XeroLite is properly connected to Interactive Brokers.