Interactive Brokers FAQ: 160+ Questions Answered
Every question traders ask about IBKR, answered in one place. Account setup, trading, orders, market data, automation, TradingView integration, and more. Updated April 2026.
Key Takeaways
- Interactive Brokers supports 150+ markets in 34 countries with stocks, options, futures, forex, bonds, and crypto.
- IBKR Pro is required for API and automated trading; IBKR Lite does not support API access.
- TradingView-to-IB webhook automation needs middleware. PickMyTrade provides this as a managed, no-code service for $50/mo.
- IB's nightly restart (~11:45 PM ET) and weekly 2FA are the biggest operational hurdles for automated systems.
- Bracket orders, trailing stops, and multi-account execution are complex via API but available as built-in features on PickMyTrade.
Table of Contents
No results found
Try a different search term or .
1. Getting Started with Interactive Brokers
Interactive Brokers (IBKR) is a global online brokerage offering access to 150+ markets across 34 countries. It supports stocks, options, futures, forex, bonds, mutual funds, ETFs, and cryptocurrency. IBKR is best for active traders, algorithmic traders, and professionals who need low commissions, global market access, and powerful API capabilities. It's less suited for casual buy-and-hold investors who want a simpler experience.
IBKR Lite: Commission-free US stock/ETF trades, no account minimums, simple interface. Receives payment for order flow (PFOF). Does NOT support API access or advanced order types.
IBKR Pro: Low per-share commissions ($0.0005-$0.005/share), direct market access, SMART order routing, full API access, advanced order types, and professional-grade tools. Required for automated trading.
If you plan to use any automation, API connections, or TradingView webhook execution, you must use IBKR Pro.
There is no minimum deposit to open an IBKR account (this changed in 2021 -- previously it was $10,000). However, to trade on margin you'll need at least $2,000 (Reg T requirement). For pattern day trading (PDT), you need $25,000 minimum equity. For API access specifically, IB recommends at least $500 in the account plus the cost of any market data subscriptions.
The application takes 10-15 minutes online. Account approval typically takes 1-3 business days for US residents and 2-5 business days for international accounts. You'll need to provide identity verification documents (passport/driver's license), proof of address, and financial information. Funding via wire transfer takes 1-4 business days; ACH takes 2-4 days.
IB offers the broadest asset class coverage of any retail broker:
- Stocks & ETFs: 150+ exchanges worldwide
- Options: US and international equity/index options
- Futures: CME, CBOT, NYMEX, COMEX, ICE, Eurex, and more
- Forex: 100+ currency pairs via IDEALPRO
- Bonds: US Treasuries, corporate, and municipal bonds
- Mutual Funds: 37,000+ mutual funds from 400+ fund families
- Cryptocurrency: BTC, ETH, LTC, BCH via Paxos
- Warrants, SSFs, CFDs (availability varies by region)
Yes. IBKR accepts clients from 200+ countries and territories. International accounts can access US markets and most global exchanges. Account entities vary by region (IBKR LLC for US, IBKR UK for UK/EU, IBKR HK for Asia). Note that available products differ by jurisdiction due to local regulations -- for example, CFDs are available in Europe but not the US.
Trader Workstation (TWS): Full-featured desktop application with advanced charting, order management, and analytics. Available for Windows, Mac, and Linux.
IB Gateway: Lightweight connection point for API-only trading. Uses ~40% fewer resources than TWS. No charting GUI.
Client Portal: Web-based platform for account management, basic trading, and reporting. Access from any browser.
IBKR Mobile: iOS and Android apps for trading on the go. Includes Face ID/Touch ID authentication.
IBKR GlobalTrader: Simplified mobile app for casual stock trading.
IB supports multiple funding methods: Wire transfer (fastest for large amounts, 1-4 business days), ACH (US banks, 2-4 days, free), ACATS transfer (from another broker, 5-8 days), and check deposit (5-10 days). IB does not charge deposit fees, but your bank may charge for wire transfers. Minimum initial deposit is $0, though you need funds before trading. For international transfers, include your IB account number in the reference.
Yes, IB is one of the most financially stable brokers: $15.5+ billion in equity capital, publicly traded (NASDAQ: IBKR), regulated by the SEC, FINRA, FCA, and other global regulators. US accounts are protected by SIPC insurance up to $500,000 (including $250,000 for cash). IB also carries excess SIPC insurance through Lloyd's of London for additional protection. Client securities are held separately from the firm's own assets.
Yes. IBKR supports fractional share trading for US stocks and ETFs with as little as $1 per trade. Fractional shares are available through TWS, Client Portal, IBKR Mobile, and the API. Note: fractional shares have some limitations via the API -- quantity must be expressed as a decimal, and not all order types support fractional quantities.
2. Fees, Commissions & Margin
US Stocks (Pro): $0.005/share (min $1.00, max 1% of trade value). Tiered pricing from $0.0035/share for >300K shares/month.
US Options: $0.65/contract (tiered from $0.15/contract at high volume).
US Futures: $0.85/contract for standard, $0.25/contract for micros (e.g., MES, MNQ).
Forex: 0.20 basis points of trade value (min $2.00).
Crypto: 0.12-0.18% of trade value.
IBKR Lite: $0 for US stocks/ETFs, but uses payment for order flow.
No inactivity fees as of July 2021 (IB eliminated the $10/month minimum commission requirement). There are no platform fees, no account maintenance fees, and no withdrawal fees for one withdrawal per month. Additional withdrawals cost $10 each. Market data subscriptions are charged separately (see Market Data section).
IB offers two margin types: Reg T margin (standard, 50% initial / 25% maintenance for stocks) and Portfolio Margin (risk-based, typically 15-20% for diversified portfolios, requires $110,000+ equity).
IB's margin rates are among the lowest in the industry: 6.83% for balances up to $100K, decreasing to 5.83% for $1M+. Compare this to 12-13% at most other brokers. IB calculates margin in real-time and will liquidate positions automatically if your account falls below maintenance requirements -- there are no margin calls (IB liquidates directly).
If you execute 4+ day trades within 5 business days in a margin account, you're flagged as a Pattern Day Trader and must maintain at least $25,000 in equity. IB enforces this strictly -- if you fall below, you'll be restricted to closing trades only for 90 days or until you deposit funds.
Workarounds: Use a cash account (no PDT rule but no margin), trade futures (exempt from PDT), trade in a non-US IB entity, or maintain $25K+ in your account.
Market data is sold separately. Common subscriptions:
- US Equity (NASDAQ/NYSE): $1.50-$4.50/month
- US Options (OPRA): $1.50/month
- US Futures (CME/CBOT/NYMEX): $10/month each
- Forex: Free!
- Crypto: Free!
Snapshot quotes are $0.01-$0.03 per request (charged on-demand instead of monthly). IB waives some data fees if you generate enough commission revenue. You can trade without real-time data, but you'll only see delayed (15-minute) quotes.
Without a subscription, you receive delayed data (15-minute lag) for free. You can still place orders -- they'll execute at current market prices even if your display shows delayed quotes. For strategies that need real-time prices, subscriptions are essential. Forex and crypto data are always free and real-time.
Stocks: IB Pro charges $0.005/share vs. $0 at Schwab/Fidelity (but those use PFOF). IB's execution quality typically saves more than the commission cost.
Options: IB $0.65/contract vs. Schwab $0.65 vs. Tastytrade $0 to close.
Futures: IB $0.85/contract vs. NinjaTrader $0.09 (with platform fee) vs. Tradovate $0.79.
Margin rates: IB 6.83% vs. Schwab 12.32% vs. Robinhood 6.75%. IB wins on margin decisively.
IB does NOT issue traditional margin calls. Instead, they automatically liquidate positions in real-time when your account falls below maintenance margin requirements. Liquidation happens without warning -- IB's algorithms sell the most liquid positions first to bring the account back into compliance. This can happen during volatile market moves even if you're away from your screen.
To avoid liquidation: use conservative position sizing, monitor your margin cushion, and set up alerts in TWS/mobile for margin warnings.
IB charges just 0.20 basis points (0.002%) for currency conversions with a minimum of $2.00. This is far cheaper than most banks or brokers (which charge 0.5-2%). You can convert currencies manually in TWS at interbank rates, or let IB auto-convert when you trade foreign securities. Multi-currency accounts can hold positions and cash in multiple currencies simultaneously.
Yes. IB pays interest on idle cash balances above $10,000. The rate is based on the benchmark rate minus a spread (currently paying around 4.33% APY for USD). Cash below $10,000 does not earn interest. You can also participate in IB's Stock Yield Enhancement Program to earn extra income by lending out your fully-paid shares to short sellers.
3. TWS & IB Gateway
Download TWS from interactivebrokers.com → Technology → Trading Platforms → TWS. Choose between the "Latest" version (newest features, updated weekly) and "Stable" version (less frequent updates, more reliable for automation). TWS is a Java application -- the installer includes its own JVM so you don't need to install Java separately. Available for Windows, macOS, and Linux.
IB Gateway is a lightweight, headless version of TWS designed specifically for API connections. It uses ~40% fewer system resources than TWS and accepts API connections by default.
Use IB Gateway when: You only need API connectivity (no manual trading GUI), you're running on a server, or you want minimal resource usage.
Use TWS when: You need charts, manual order entry, scanners, or the visual interface alongside your API scripts.
Both are functionally identical from an API perspective -- the same code works with either.
Navigate to Edit → Global Configuration → API → Settings and configure:
- Check "Enable ActiveX and Socket Clients"
- Set the Socket Port (default: 7496 for live, 7497 for paper)
- Check "Download open orders on connection" to see manually-placed orders
- Add your IP to "Trusted IPs" if connecting from another machine
In IB Gateway, API connections are enabled by default -- just set the port and trusted IPs.
TWS: 7496 (live), 7497 (paper)
IB Gateway: 4001 (live), 4002 (paper)
You can change these in the API settings. Make sure your firewall allows connections on whichever port you're using.
IB forces a mandatory disconnect around 11:45 PM ET Sunday-Friday for server maintenance. The outage lasts 5-15 minutes. During this window, all API connections drop and orders may be cancelled.
For manual traders: TWS auto-reconnects after the restart. Go to File → Global Configuration → Lock and Exit → set the Auto Logoff Timer.
For automated systems: Use IBC (IBController) to handle automated re-login, or implement reconnection logic in your code. Schedule no critical operations between 11:30 PM and 12:15 AM ET.
Both TWS and IB Gateway require a display (even on a server without a monitor). Install Xvfb for a virtual display:
sudo apt install xvfb Xvfb :1 -screen 0 1024x768x16 & export DISPLAY=:1
For production, use Docker images that bundle IB Gateway + IBC + Xvfb (e.g., ghcr.io/gnzsnz/ib-gateway). These handle automated login, display, and restart management in a single container.
IBC is an open-source automation tool that handles TWS/Gateway login, dismisses pop-up dialogs, manages 2FA prompts, and enables auto-restart after nightly maintenance. Without IBC, your system would stall every time a dialog box appears.
You need IBC if: Running automated trading on a server, using Docker, or needing 24/7 unattended operation. You don't need IBC if: You're trading manually or always present at the computer.
IB Gateway: ~500MB RAM baseline, can spike to 2GB+ during heavy data requests. 1 CPU core is sufficient.
TWS: 1-3GB RAM depending on how many charts/watchlists are open. 2 CPU cores recommended.
For VPS hosting: a 2GB RAM, 2 vCPU server ($12-20/month at DigitalOcean or AWS) handles IB Gateway comfortably. Set Java heap memory to at least 4096MB in IBC config to prevent crashes during peak usage.
No -- you can only have one trading application logged in per username at a time. Running both TWS and Gateway simultaneously with the same credentials will cause one to disconnect the other. To use both, create a secondary username under your account in Account Management → Settings → Users & Access Rights.
The three pillars of 24/7 IB operation:
- IBC: Handles automated login, dismisses dialogs, manages 2FA
- Watchdog/Auto-restart: Detects disconnections and restarts the gateway
- Process monitor: Systemd (Linux) or Task Scheduler (Windows) to restart if the process crashes
Even with all of this, you'll still need to manually authenticate via 2FA once per week for live accounts. There's no way to fully automate this.
4. Connection & Authentication
Most connection failures come down to these causes:
- Error 502/504: TWS is not running or API is not enabled. Check Global Configuration → API → Settings.
- Connection refused: Wrong port number (7496=live TWS, 7497=paper TWS, 4001=live Gateway, 4002=paper Gateway).
- Timeout on first attempt: Known issue -- TWS needs a few seconds to initialize its API server after startup. Retry after 2-3 seconds.
- IP not trusted: Add your IP to the Trusted IPs list in API settings.
- Firewall blocking: Whitelist the port in your OS/router firewall.
2FA is mandatory for all live IB accounts. Methods available: IBKR Mobile app (push notification -- recommended), IB Key security device (physical token), or SMS code (least secure).
For API trading: 2FA must be completed when logging into TWS/Gateway. Once authenticated, the session stays active until the nightly restart. You'll need to re-authenticate approximately once per week (Sunday evening). There's no way to fully automate 2FA -- IB intentionally blocks automation for security.
Common causes of mid-day disconnections:
- Competing sessions: Logging into the IB website or mobile app while TWS is running can cause a "competing live session" disconnect (Error 10197).
- Internet instability: IB drops the connection if TCP keepalive fails.
- Overloaded requests: Making too many data requests (>50 messages/second) can cause IB to disconnect you.
- IB server-side issues: Rare but happens during high volatility events.
- TWS version update: IB sometimes forces updates that require a restart.
Always implement automatic reconnection logic for production systems.
Each TWS/Gateway session supports up to 32 simultaneous API client connections, each identified by a unique clientId (0-32). However, only one trading session per username can be active at a time. To run multiple sessions, create additional usernames under your account.
Error 10197 means another application is already streaming market data for your account. This happens when TWS and a web session are both open, when a previous API session wasn't disconnected properly, or when IB Gateway and TWS are using the same username. Fix: close the competing session or create a secondary username for API use.
Yes. TWS/Gateway must run on the server (or a nearby machine), and your API script connects to it. Add the server IP to the Trusted IPs list. For cloud deployments, the recommended approach is Docker with IB Gateway running on the same server as your trading code.
For security, use SSH tunneling rather than exposing the API port directly to the internet:
ssh -L 7497:localhost:7497 user@your-server
IB requires re-authentication approximately once per week. Your options:
- IBKR Mobile push: Set up push-based 2FA and tap "Approve" on your phone when prompted.
- VNC access: Keep VNC enabled on your server to remotely interact with the Gateway login dialog.
- Scheduled maintenance: Plan a weekly window during off-hours to manually re-authenticate.
- Use PickMyTrade: Managed services handle authentication complexity entirely.
For the TWS API (socket-based): No, a running instance of TWS or IB Gateway is required. The API client connects to TWS/Gateway, which then communicates with IB's servers.
For the Web API (REST): IB is developing a new REST API with OAuth 2.0 that won't require a local application. However, it's not yet at feature parity with the TWS API and has some authentication complexity.
IB allows only one active trading session per username. Logging into Client Portal or the website can kick out your Gateway session (and vice versa). Solution: create a secondary username dedicated to API trading. Go to Account Management → Settings → Users & Access Rights → Add User.
You can't prevent the mandatory nightly restart, but you can minimize other drops: 1. Use IB Gateway (more stable than TWS for long-running sessions). 2. Don't log into IB's website or mobile while running. 3. Limit data requests to stay under 50 messages/second. 4. Use a stable internet connection (wired, not Wi-Fi). 5. Implement automatic reconnection with market data re-subscription.
5. Market Data
It depends on what you trade. Common bundles:
US Day Trader: NASDAQ (TotalView) $1.50 + NYSE (OpenBook) $1.50 = $3/month
Options Trader: Add OPRA $1.50/month
Futures (CME): $10/month (covers ES, NQ, CL, GC)
Forex: Free -- no subscription needed
Crypto: Free -- no subscription needed
Subscribe in Account Management → Market Data Subscriptions. IB waives up to $30/month in data fees if you generate enough commission revenue.
You don't have a market data subscription for that exchange. In TWS, delayed data shows with a "D" indicator. In the API, you'll see "Error 10168: Requested market data is not subscribed." Forex and crypto are always real-time and free. For equities/futures, purchase the appropriate data subscription or accept 15-minute delayed quotes.
IB enforces strict rate limits on historical data (via API):
Max 50 simultaneous requests
Max 60 requests per 10-minute window
No identical requests within 15 seconds
Duration limits by bar size: 1-second bars = max 1 day, 1-minute bars = max 30 days, 1-hour bars = ~2.5 years, daily bars = ~15 years. Exceeding these limits triggers "pacing violation" errors. For bulk data downloads, throttle requests and consider using Flex Reports instead.
Small price discrepancies (up to 10 cents) are normal due to: 1. Different exchange routing -- IB SMART aggregates from multiple exchanges while others may show single-exchange data. 2. Extended hours inclusion -- different platforms have different default settings for pre/post market data. 3. Trade corrections and late prints retroactively change bars. 4. Bar timestamp alignment differs between providers.
Expired futures: Yes, if you specify the exact contract details and use includeExpired=True.
Delisted stocks: Generally no. IB removes data for delisted securities, which creates survivorship bias in backtesting. For complete historical data, use a third-party provider like Norgate Data or Polygon.io.
Common causes: 1. Requesting one bar at a time instead of in batches (use proper duration strings like "1 D", "1 M"). 2. Not throttling requests -- hitting pacing violations causes delays. 3. Options data is inherently slower than equity data. 4. Weekend/off-hours requests may be slower due to IB server load balancing.
For large datasets, use Flex Reports (batch export from Account Management) instead of the live API.
Flex Reports are customizable data exports available in Account Management → Reports → Flex Queries. You can export: trade history, positions, account summaries, P&L data, dividend history, and more. Reports are generated in XML or CSV format and can be downloaded via the API using a token + query ID. Useful for tax reporting, performance analysis, and historical data that's impractical to pull through the live API.
Not exactly. IB batches changes into aggregated snapshots rather than delivering every individual market event. This is a confirmed limitation. For high-frequency strategies needing true tick-level data, you may need a dedicated market data provider. For most strategies (swing, position, even intraday), IB's data granularity is more than sufficient.
IB's historical data servers (HMDS) often undergo maintenance on weekends, causing partial or complete outages. This is a long-standing frustration (one of the most upvoted complaints on Reddit). Workaround: Download and cache any data you need before Friday close, and don't rely on weekend access for backtesting runs.
Level 2 data requires a deep book subscription (e.g., NASDAQ TotalView at $1.50/mo). In TWS, right-click a ticker → Open Market Depth. Via the API, use reqMktDepth(). IB limits the number of simultaneous depth subscriptions (typically 3-5). Using SMART routing aggregates book data from all exchanges into a single depth view.
6. Order Types & Execution
IB supports 100+ order types, far more than any other retail broker. Common ones:
- Market / Limit / Stop / Stop-Limit -- The basics
- Trailing Stop / Trailing Stop Limit -- Auto-adjusting stops
- Bracket Orders -- Entry + take-profit + stop-loss as a group
- OCA (One-Cancels-All) -- Group of orders where one fill cancels the rest
- Adaptive -- IB's smart algorithm for best execution (Patient/Normal/Urgent)
- TWAP / VWAP -- Time/Volume-weighted average price algorithms
- GTC / GTD / IOC / FOK -- Time-in-force options
- Conditional Orders -- Trigger based on price, time, or margin conditions
SMART routing is IB's proprietary order routing technology that automatically scans multiple exchanges and dark pools to find the best available price for your order. It considers price, liquidity, and speed. Yes, you should use it for most orders -- it typically provides better execution than routing to a specific exchange. The only exception is if you have a specific reason to target a particular exchange (e.g., market making, specific exchange rebates).
PendingSubmit means the order was sent but not yet acknowledged by the exchange. Causes: 1. Paper trading simulator lag (can take several seconds). 2. Market is closed and the order is queued. 3. IB is performing a margin check. 4. The order's transmit flag was set to False (staged but not sent). 5. Network/API event loop not processing status updates. Wait a few seconds and check the status again.
Yes. In TWS, check the "Allow order to be activated, triggered, or filled outside of Regular Trading Hours" box. Via API, set outsideRth=True. Extended hours for US equities: 4:00 AM - 8:00 PM ET. Important: only limit orders are accepted during extended hours -- market orders will be rejected. Spreads are typically much wider outside RTH.
OER = (submissions + revisions + cancellations) / (executions + 1). IB considers an OER above 20 to be excessive. If your algo submits and cancels too many orders without fills, IB may restrict your API access. This matters for strategies that rapidly adjust limit orders. Keep your submission-to-fill ratio low by using wider limit prices or IB's adaptive algorithms.
In TWS: Edit → Cancel All Orders (or Ctrl+Shift+C). Via API: use reqGlobalCancel() which cancels all orders across all client connections. To close all positions as well, you must iterate through positions and place closing orders individually -- there's no single "flatten everything" button.
Error 103 means you're trying to use an order ID that's already been assigned. Causes: manually setting order IDs instead of letting the API auto-assign, multiple connections sharing the same clientId, or a stale connection. Fix: let your API library handle order IDs automatically, use unique clientIds per connection, and disconnect/reconnect to reset the ID counter.
Adaptive: Dynamically adjusts between market and limit pricing. Three urgency levels: Patient (better price), Normal (balanced), Urgent (faster fill).
TWAP: Splits your order over a specified time period for even execution.
VWAP: Executes proportional to actual market volume throughout the day.
All algos are available via TWS and API for US equities, options, futures, and forex. They help reduce market impact for larger orders.
Yes. In TWS, click "Preview" before transmitting any order to see initial/maintenance margin changes, estimated commission, and account impact. Via API, set order.whatIf = True to get the same preview data without actually executing. This is critical for options/futures strategies where margin requirements can be surprising.
IB allows 50 messages per second to TWS/Gateway. This includes order submissions, modifications, cancellations, data requests, and all other API calls. Exceeding this rate causes messages to be queued or dropped. For high-frequency order management, batch your operations and implement client-side rate limiting.
7. Brackets & Stop Orders
A bracket order links three orders: entry + take-profit + stop-loss. When the entry fills, both exit orders become active. When either exit fills, the other is automatically cancelled. In TWS: right-click your order → Attach → Bracket Orders. Set your profit target and stop distance.
Via API, use the bracketOrder() helper function, which sets the correct transmit flags and parent/child relationships automatically.
A trailing stop follows the market price by a fixed amount or percentage. As the price moves in your favor, the stop price adjusts upward (for longs) or downward (for shorts). When the price reverses by the trail amount, the stop triggers.
Fixed amount: Trail by $2.00 -- if stock is at $150, stop is at $148. Stock rises to $160, stop moves to $158.
Percentage: Trail by 5% -- if stock is at $150, stop is at $142.50. Stock rises to $200, stop at $190.
Note: trailing stops may not work outside RTH by default. Enable extended hours if needed.
IB's built-in bracket doesn't support multiple TPs. You need to manually create OCA (One-Cancels-All) groups with partial quantities: sell 1/3 at target 1, 1/3 at target 2, and leave 1/3 with a trailing stop. This is complex to set up both in TWS and the API.
After the parent fills, child orders become independent orders. Their internal order IDs may change, making the original references stale. In TWS you can still modify them visually. Via API, query open orders after the parent fills and find the children by their parentId to modify them.
OCA links multiple orders so when one fills, the others are cancelled. Three types: Type 1 (Cancel): Fill one, cancel all others -- best for mutually exclusive exits. Type 2 (Reduce): Fill one, reduce others by the filled quantity. Type 3 (Reduce, no block): Like Type 2 but doesn't prevent fills from racing. Only Type 1 works reliably in all cases.
You can't attach a child order to an already-filled parent. Instead, place a standalone stop order on the same instrument. In TWS: simply create a new Stop order for the opposite direction with your position's quantity. Remember to cancel it manually if you close the position another way, or you'll end up with an unintended new position.
Stop order: When the stop price is reached, it becomes a market order and fills at the next available price. Guarantees a fill but not the price (risk of slippage in fast markets).
Stop-Limit order: When the stop price is reached, it becomes a limit order at your specified limit price. Guarantees the price but NOT a fill -- if the market gaps through your limit, your order won't execute, leaving you exposed.
For safety (guaranteed exit): use stop orders. For slippage protection on less urgent exits: use stop-limits with the limit a few cents below the stop.
Not by default. You must explicitly enable outsideRth = True on the trailing stop order. Without this flag, the trail adjustment only occurs during regular trading hours (9:30 AM - 4:00 PM ET). Even with extended hours enabled, the trailing stop only adjusts based on trades, so thin after-hours volume may cause unexpected triggering.
Yes. Replace the fixed stop-loss in your bracket with a trailing stop order. In TWS: use the order preset to attach a trailing stop instead of a regular stop. Via API: create the child stop order with orderType='TRAIL' and set the auxPrice (trail amount) or trailingPercent. This gives you the best of both worlds -- a fixed profit target and a dynamic stop that locks in gains.
Conditional orders activate only when specific criteria are met. In TWS: right-click order → Condition → add price, time, margin, or volume conditions. For example: "Buy AAPL at $145 limit, but ONLY if SPY is above $450." Conditions can be combined with AND/OR logic. Via API, set the order.conditions list with condition objects (PriceCondition, TimeCondition, MarginCondition, etc.).
8. Options Trading
In TWS: Right-click a stock → Option Chain (or use the OptionTrader tool: New Window → OptionTrader). This shows all available strikes, expirations, and Greeks. You can filter by date, strike range, and moneyness. The Probability Lab tool helps visualize expected moves and probability distributions.
Via API: use reqSecDefOptParams() to get available strikes/expirations, then create individual option contracts to query data.
For US options: OPRA (US Options Exchanges) at $1.50/month. This covers all US equity and index options. You also need the underlying stock data subscription to see Greeks (since greeks depend on the underlying price). For futures options (e.g., ES options), you need the CME data subscription ($10/month).
In the OptionTrader or Option Chain view, Greeks are displayed by default (delta, gamma, theta, vega, implied volatility). You can also add Greek columns to any watchlist: right-click the column header → Insert Column → Option Greeks.
Greeks require market data for both the option AND the underlying. During illiquid periods (no bid/ask), Greeks will show as N/A.
In TWS OptionTrader: 1. Click the "Combo" or "Strategy Builder" tab. 2. Select a pre-built strategy (vertical, straddle, strangle, butterfly, iron condor, etc.) or build custom legs. 3. Set your net credit/debit limit price. 4. Submit as a single combo order.
IB supports up to 6 legs per combo order (exchange-dependent). For SMART-routed combos, you must specify "non-guaranteed" mode since the legs may fill on different exchanges.
Options markets are fragmented across 16+ US exchanges. The displayed NBBO (best bid/offer) may not reflect the actual available liquidity at that price. By the time your order routes, the quote may have changed. Using limit orders at the mid-price and IB's Adaptive algorithm generally gets better fills than market orders. For illiquid options (wide spreads), always use limit orders.
Yes. In TWS: right-click the option position → Exercise. Via API: use exerciseOptions(). Early exercise is typically only advantageous for deep-in-the-money American-style options near ex-dividend dates. In most cases, selling the option captures more value than exercising because you lose the remaining time value when exercising.
If you're short an option and it's exercised against you, IB will notify you after market close and adjust your position accordingly. Assignments can happen any time for American-style options, but most occur at expiration. IB will auto-liquidate if the resulting position (e.g., 100 shares of stock) exceeds your margin capacity. To avoid surprise assignments, close short options before expiration, especially those close to the money.
IB follows standard rules: options that are $0.01+ in-the-money at expiration are automatically exercised (OCC rule). Options out of the money expire worthless. IB may auto-close expiring positions before close if the exercise/assignment would exceed margin or create undesirable risk. This auto-liquidation typically happens 15-30 minutes before market close on expiration day.
Yes. IB supports trading options on their expiration day. SPX, SPY, QQQ, IWM, and many ETFs now have daily expirations (Monday through Friday). Be aware that 0DTE options have extreme gamma risk, and IB may auto-liquidate positions approaching expiration if they threaten margin requirements. Use limit orders -- 0DTE spreads can be very wide.
Historical IV is available for the underlying (not individual option strikes) via whatToShow='OPTION_IMPLIED_VOLATILITY' in historical data requests. For individual option historical data, you must request historical prices per strike and compute IV yourself. IB's Volatility Lab in TWS provides IV charts, skew analysis, and term structure visualization for visual analysis.
9. Futures Trading
IB offers access to all major futures exchanges worldwide: CME, CBOT, NYMEX, COMEX (US), ICE (US/UK), Eurex (Europe), HKFE (Hong Kong), SGX (Singapore), OSE (Japan), and many more. Popular contracts: ES (S&P 500), NQ (Nasdaq), YM (Dow), CL (Crude Oil), GC (Gold), ZB (Treasury Bonds), 6E (Euro FX).
Micro futures are 1/10th the size of standard contracts, making them accessible for smaller accounts. IB commissions for micros: $0.25/contract (tiered) or $0.32 (fixed). Popular micros: MES (Micro E-mini S&P 500, $5/point), MNQ (Micro E-mini Nasdaq, $2/point), MYM (Micro E-mini Dow, $0.50/point), MCL (Micro WTI Crude, $1/point).
Margin requirements for micros are proportionally lower -- MES overnight margin is around $1,300-1,500 (varies with volatility).
Futures margin at IB has two levels: Initial margin (required to open a position) and Maintenance margin (minimum to hold it). IB sets margins at or above exchange minimums. Example for ES: ~$13,200 initial, ~$12,000 maintenance (varies with volatility).
Intraday vs overnight: IB does NOT offer reduced intraday margins like some futures brokers (NinjaTrader, Tradovate). Margin is the same 24/7. This means you need more capital per contract at IB, but the trade-off is lower commissions and better execution quality.
In TWS: Right-click the futures position → Roll. This creates a spread order that simultaneously closes the current month and opens the next month. Rolling as a spread is more efficient than two separate orders because you get a single net price and pay less in commissions.
Manually via API: create a BAG (combo) order with one leg selling the current month and one leg buying the next month. Roll before the contract's first notice day to avoid physical delivery obligations.
You need a futures market data subscription. CME Bundle Level 1 ($10/month) covers ES, NQ, CL, GC, and other CME/CBOT/NYMEX/COMEX products. Without it, you'll see delayed or no data. Some exchanges (Eurex, HKFE) require separate subscriptions. Also make sure you're specifying the correct exact contract month -- continuous futures symbols (like "ES1!") don't work the same way in IB as they do on TradingView.
Continuous futures (ContFuture in the API) are synthetic instruments that stitch together sequential contract months to create a continuous price history. They're available for historical data and charting only -- you cannot place orders or get real-time data using continuous futures. For trading, you must specify the exact contract month (e.g., ESH6 for March 2026).
Yes. The PDT rule only applies to equity and equity options in margin accounts. Futures (and futures options) are exempt. You can day trade futures as many times as you want without the $25,000 minimum equity requirement. This makes micro futures particularly attractive for smaller accounts that want to day trade actively.
Most CME futures trade nearly 24 hours: Sunday 6:00 PM - Friday 5:00 PM ET with a daily 1-hour maintenance break (5:00-6:00 PM ET). Regular Trading Hours (RTH) for equity index futures: 9:30 AM - 4:00 PM ET. The Globex session covers the overnight hours. All hours are accessible through IB's API and TWS.
TradingView's native IB integration doesn't support automated futures execution from alerts. You need middleware:
IB strengths: Lowest commissions for micros ($0.25), best margin rates, global exchange access, multi-asset (trade stocks + futures in same account), powerful API.
IB weaknesses: No reduced intraday margins, complex platform, weekly 2FA requirement.
NinjaTrader: $0.09/contract with platform subscription, reduced day trading margins ($50 for MES). Better for pure futures scalpers.
Tradovate: Commission-free plan available, modern API, reduced intraday margins. Limited to US futures only.
10. Portfolio & PnL
In TWS: the Portfolio window shows all positions with real-time P&L, market value, average cost, and unrealized gains/losses. Add columns for percentage gain, Greeks, and other metrics. In Client Portal: go to Portfolio → Positions. Via API: use ib.portfolio() for comprehensive data or ib.positions() for basic info.
Different IB platforms may use different calculation methods and update frequencies. TWS updates in near-real-time, while the mobile app and Client Portal may lag by several minutes. P&L differences can also arise from: different cost basis methods (FIFO vs average), inclusion/exclusion of commissions, and currency conversion timing for multi-currency accounts. The Account Summary page in Client Portal is the most authoritative source.
In Client Portal: Reports → Statements. Generate daily, monthly, or custom activity statements that include trades, P&L, commissions, dividends, and interest. For automated access, use Flex Queries (Reports → Flex Queries) which provide customizable XML/CSV exports downloadable via API. The API's real-time P&L (reqPnl()) only shows current-day data.
IB defaults to FIFO (First In, First Out) for US tax reporting. You can change the default method in Account Management → Settings → Trading → Cost Basis. Options include FIFO, LIFO, and specific lot identification. For tax optimization, use Tax Lot Optimizer in TWS to select which specific lots to close when selling partial positions.
In TWS: Account Window → Account Summary. Key metrics: Net Liquidation Value (total account value), Available Funds (buying power), Maintenance Margin (minimum required), Excess Liquidity (cushion above maintenance). Watch "Cushion" percentage -- if it drops to 0%, liquidation begins.
This is an IB server-side limitation. Account values are pushed from IB at fixed intervals (~3 minutes for some fields, up to 20 minutes for others). There's no way to force faster updates through the API. For more frequent P&L tracking, subscribe to real-time P&L using reqPnl() which updates more frequently than the account summary.
IB provides comprehensive tax reporting: 1. Annual tax forms (1099-B, 1099-DIV, 1099-INT) available in Client Portal by mid-February. 2. Activity Statements with trade-by-trade detail (Reports → Statements). 3. Flex Queries for custom exports. IB also integrates with tax software like GainsKeeper and TradeLog for wash sale tracking. For international traders, IB provides appropriate local tax documentation.
Yes. IB pays a short credit interest rate on the cash proceeds from short sales. The rate depends on the stock's borrow cost. For easily-borrowed stocks, you'll earn close to the benchmark rate minus a spread. For hard-to-borrow stocks, the borrow cost may exceed the interest credit. Check rates for specific stocks in TWS: right-click → Financial Instrument Info → Short Availability.
IB's SYEP lets you earn extra income by lending your fully-paid shares to short sellers. IB handles all the logistics -- you just opt in via Account Management. You receive 50% of the lending revenue (IB keeps the other 50%). Rates vary by demand: high-demand stocks can earn 10-50%+ annualized. Your shares remain sellable at any time. The risk is minimal but includes counterparty risk if the borrower defaults.
Best practice: 1. After every trade, compare your expected position to IB's reported position. 2. On startup, sync your internal state from IB's positions (don't assume your database is correct). 3. Use execution reports and fill events (not just order status) as the source of truth. 4. Run a daily end-of-day reconciliation against IB's activity statement. 5. Set up alerts for any discrepancy.
11. API & Automation
IB provides four API types:
- TWS API (Socket-based): Most powerful. Python, Java, C++, C#. Requires TWS/Gateway running. Streaming data, all order types, 100+ features.
- Web API (REST): HTTP-based, OAuth 2.0. No TWS needed. Still being expanded -- not yet at full feature parity.
- Excel API (DDE/RTD): Real-time data in spreadsheets. RTD for display, DDE for trading.
- FIX Protocol: Institutional standard. Direct market access for professional firms.
Official: ibapi -- IB's native Python API. Callback-based, verbose, but officially supported.
Community (recommended): ib_async -- Higher-level, Pythonic, asyncio-based successor to the popular ib_insync library (which was archived in 2024 after the creator's passing). Install with pip install ib_async. Drop-in replacement for ib_insync.
Frameworks: QuantConnect (LEAN), Backtrader, and Zipline-live all offer IB integration for backtesting + live trading.
ib_insync was the most popular Python library for IB (3,700+ GitHub stars). Its creator, Ewald de Wit, passed away in March 2024, and the repository was archived. The maintained successor is ib_async (github.com/ib-api-reloaded/ib_async) -- a community fork that's a drop-in replacement.
ib_insync still works but receives no updates, security patches, or compatibility fixes. Migrate to ib_async for any production system. Migration is simple: just change from ib_insync import * to from ib_async import *.
Based on 1,100+ forum posts and GitHub issues, the top challenges are:
- #1 Connection reliability: Nightly restarts, 2FA requirements, random disconnections
- #2 Asyncio complexity: Integrating with web frameworks (Flask, Django, FastAPI) or GUIs
- #3 Silent error handling: Errors go to events rather than raising exceptions
- #4 Rate limiting: 50 msg/sec cap, 50 simultaneous historical data requests, pacing violations
- #5 Order management: Bracket order modifications, OCA groups, status tracking
Yes! Several no-code options exist:
- PickMyTrade ($50/mo): TradingView alerts → IB execution. Supports 9 brokers, all order types, multi-account. Setup in 2 minutes.
- TWS built-in: Conditional orders and scanner-triggered alerts within TWS itself.
- Excel DDE: Build spreadsheet-based systems without traditional coding.
- QuantConnect: Visual strategy builder with IB deployment.
Recommended setup: Ubuntu 22.04, 2GB RAM, 2 vCPU ($12-20/month). Use Docker with a pre-built IB Gateway image:
docker run -d --name ib-gateway \ -p 4002:4002 -p 5900:5900 \ -e TWS_USERID=username \ -e TWS_PASSWORD=password \ -e TRADING_MODE=paper \ ghcr.io/gnzsnz/ib-gateway:stable
Then run your Python bot on the same server, connecting to localhost:4002. Use systemd to auto-restart your bot on crashes. For lowest latency to IB, host in US East Coast (IB servers are in Greenwich, CT).
IB's typical order submission latency is under 40ms. Suitable for: swing trading, position trading, momentum, mean reversion, portfolio rebalancing, and most intraday strategies. Not suitable for: high-frequency trading (HFT) requiring microsecond latency, latency arbitrage, or co-located strategies. For 99%+ of algo traders, IB's speed is more than sufficient.
Official: Python, Java, C++, C#/.NET. Community libraries: Python (ib_async -- most popular), Rust, JavaScript/Node.js, Go, Ruby, R. Python dominates the IB automation ecosystem, with ib_async having the largest user base and most active development.
QuantConnect (LEAN): Full IB integration for live trading. Backtest locally or on QuantConnect's cloud, then deploy to IB with one click. Supports most IB asset classes.
Backtrader: IB live trading support since v1.5.0. Good for transitioning backtested strategies to live execution. Less actively maintained than QuantConnect.
12. TradingView + Interactive Brokers
TradingView has a native IB integration for manual trading (place orders from the chart), but it does NOT support automated execution from Pine Script alerts. For alert-to-order automation, you need middleware:
- PickMyTrade (recommended): Purpose-built for TradingView-to-IB automation. No coding needed.
- Custom webhook server: Build a Python/Flask server connected to IB API (complex).
- TradersPost: Another third-party webhook service.
1. Manual only -- no automated alert execution
2. Order execution delays (25-45 seconds reported by users)
3. Limited order types (no OCA, no complex brackets)
4. Single account only
5. Symbol mapping issues between TV and IB tickers
6. Cannot execute during extended hours from TV
7. No Pine Script strategy-to-order pipeline
Yes. Webhooks require at minimum a TradingView Pro plan ($14.95/month billed annually). The free plan doesn't support webhook URLs in alerts. Higher tiers (Pro+, Premium) allow more active alerts and potentially faster alert processing.
Total end-to-end: 2-10 seconds normally, up to 60 seconds during high load. Breakdown:
TradingView alert processing: 1-5 seconds
Webhook HTTP delivery: 0.1-0.5 seconds
Middleware processing: 0.1-1 second
IB order submission: 0.1-0.5 seconds
Exchange acknowledgment: 10-50ms
This makes webhook-based automation suitable for swing trading and position strategies, but not for scalping or HFT.
Alerts send JSON in the webhook body. A typical PickMyTrade format:
{
"action": "buy",
"symbol": "AAPL",
"qty": 100,
"order_type": "limit",
"price": {{close}},
"stop_loss": {{close * 0.98}},
"take_profit": {{close * 1.05}}
}TradingView supports dynamic placeholders: {{close}}, {{ticker}}, {{volume}}, {{time}}. Each middleware has its own JSON schema -- check their docs for exact syntax.
With a custom solution this requires complex multi-account management. PickMyTrade makes this simple: connect up to 20+ accounts, and each alert automatically executes across all connected accounts with proper position sizing. This is one of the most requested features that's extremely difficult to build yourself.
Yes, via PickMyTrade. Specify the futures contract in your alert (e.g., ES, NQ, MES, MNQ, CL) and the platform handles contract resolution, rollover awareness, and order routing to IB. PickMyTrade is particularly popular for futures automation because it handles the complexity that TradingView's native IB integration doesn't support.
Architecture: TradingView webhook → Python web server (Flask/FastAPI) → IB API library (ib_async) → IB Gateway. You'll need: a TradingView Pro+ subscription (webhooks), a publicly accessible server (cloud VPS), IB Gateway with IBC for auto-login, and robust reconnection/error handling code. This is a significant engineering project -- expect weeks of development and ongoing maintenance. For most traders, a managed service like PickMyTrade is more cost-effective.
Common causes: 1. Alert conditions not met (check your Pine Script logic). 2. Alert expired or hit the trigger limit. 3. TradingView server load during high-volatility events delays alert processing. 4. Webhook URL is incorrect or the receiving server is down. 5. TradingView plan limit on active alerts reached. 6. Pine Script error causing the alert to fail silently. Check TradingView's Alert Log for delivery status.
Yes, but IB's crypto offering is limited (BTC, ETH, LTC, BCH via Paxos). Only Market (with IOC) and Limit orders are supported -- no bracket orders for crypto. For broader crypto automation, PickMyTrade supports dedicated crypto brokers like Binance and Bybit alongside IB, all from the same TradingView alerts.
13. Paper Trading
Every IBKR Pro account automatically includes a paper trading account. In TWS: File → Login → select "Paper Trading". In IB Gateway: choose "Paper Trading" mode on startup. Paper accounts start with $1,000,000 in virtual funds. API ports: 7497 (TWS paper) or 4002 (Gateway paper). Account IDs start with "DU" (vs "U" for live).
Yes -- paper trading uses the same market data feeds as live trading. If you have paid subscriptions, you get real-time data in paper mode. Without subscriptions, you'll see delayed data. Forex and crypto are always real-time.
IB's paper simulator has known limitations: market orders may show PendingSubmit for seconds, limit orders may not fill even at the right price, stops may not trigger with delayed data. Paper trading is useful for testing code flow and connectivity, not realistic fill simulation. For realistic backtesting, use a proper backtesting framework (QuantConnect, Backtrader, etc.).
IBKR Lite does not support API access (live or paper). You need IBKR Pro for API-based paper trading. However, you can use TWS paper trading with IBKR Lite for manual testing via the GUI.
Client Portal → Settings → Paper Trading Account → Reset. This clears all positions and resets to $1,000,000. The reset may take a few hours. You cannot set a custom starting balance.
Yes. IB may close paper accounts that are inactive for extended periods. Treat paper accounts as disposable testing environments -- don't store important strategy state only in the paper account. Keep all critical data in your own database.
Paper uses simplified matching (no real market microstructure), may fill slower than real markets, and doesn't experience slippage or partial fills. Live trading has real liquidity, genuine order book interaction, and actual market impact. Code that works in paper may behave differently live.
Yes. Paper trading supports all asset classes available in your live account: stocks, options, futures, forex, crypto. You need the appropriate trading permissions enabled on your account (even for paper). Margin calculations in paper trading follow the same rules as live.
Absolutely yes. Always test on paper first to verify: connection handling, order placement logic, position tracking, reconnection behavior, and error handling. Run paper for at least a few days including overnight sessions and the nightly restart. Just remember that paper fills are not realistic -- don't use paper trading P&L as a predictor of live performance.
Use environment variables or config files. Change the port number (7497 paper vs 7496 live for TWS, 4002 vs 4001 for Gateway). Always add a safety check: verify the account ID starts with "DU" (paper) or "U" (live) to prevent accidental live trading during testing.
14. Multi-Account Management
Yes, through a Financial Advisor (FA) or Friends & Family account structure. One master login controls multiple sub-accounts. You can view positions, place trades, and allocate orders across all accounts from a single TWS session. For non-FA accounts, each account needs its own separate TWS/Gateway session with a unique username.
An FA account lets you manage client accounts under a single login. You can create account groups, allocation profiles, and model portfolios. Orders can be allocated by EqualQuantity, NetLiq (proportional to net liquidation), or AvailableEquity. Minimum requirements vary by region -- contact IB for FA account setup.
Account Management → Settings → Users & Access Rights → Add User. Create a user with API trading permissions. This lets your bot run on a dedicated login while keeping your primary login for the web interface, avoiding "competing session" conflicts.
Yes. Use different clientId values (1-32) for each strategy script. Each clientId creates an independent API connection that only sees its own orders. Up to 32 strategies can run simultaneously on one account. Keep in mind that positions are shared at the account level -- coordinate between strategies to avoid conflicts.
The second connection kicks out the first. IB only allows one active connection per clientId. Use unique clientIds for each script.
clientId=0 is the "master" client. It can see and access ALL orders, including those placed manually in TWS. Non-zero clientIds only see orders they placed. Use clientId=0 for monitoring/dashboard applications. Never use clientId=0 for automated strategies to avoid accidentally interfering with manual trades.
PickMyTrade routes a single TradingView alert to 20+ connected accounts simultaneously. Each account can have custom position sizing, different instruments, and independent SL/TP settings. No FA account structure needed -- PickMyTrade works with standard individual accounts across multiple brokers (IB, Tradovate, Rithmic, and more).
The master client can view all open orders but cannot modify or cancel orders placed by other clientIds. Only reqGlobalCancel() can cancel all orders regardless of clientId.
Three allocation methods: EqualQuantity (split evenly), NetLiq (proportional to each account's net liquidation value), AvailableEquity (proportional to available equity). Set via order.faGroup and order.faMethod in the API, or through the allocation dropdown in TWS.
IB doesn't natively tag positions by strategy. Best practices: 1. Use different clientIds per strategy and track orders by clientId. 2. Use IB's Model Portfolios (FA accounts) to group positions logically. 3. Maintain your own database mapping each trade to a strategy. 4. Use order reference strings (order.orderRef) to tag trades with strategy identifiers.
15. Mobile & Web Trading
The IBKR Mobile app (iOS/Android) supports: real-time quotes and charts, all major order types, portfolio monitoring, account management, 2FA authentication, scanner, and alerts. It's surprisingly full-featured for a mobile app. However, it doesn't support API connections or webhook automation.
Client Portal is IB's web-based platform at portal.interactivebrokers.com. It handles: account management, fund transfers, market data subscriptions, statements/reports, tax documents, trading permissions, user management, and basic trading. It's the primary interface for non-trading account tasks.
Be careful. Logging into IBKR Mobile or Client Portal may create a competing session that disconnects your API bot. Create a secondary username for your bot to avoid this. With separate usernames, you can trade manually from your phone while your bot runs independently.
Yes. The IBKR Mobile app supports Face ID (iPhone), Touch ID (iPhone/iPad), and fingerprint authentication (Android) for 2FA. This is the fastest way to handle the weekly re-authentication requirement for API sessions.
IB accepts clients from 200+ countries. However, you cannot access your account from OFAC-sanctioned countries (Cuba, Iran, North Korea, Syria, etc.). IB monitors login locations and may require additional verification for unusual access patterns. Using a VPN to trade is against IB's terms of service if it masks your true location.
GlobalTrader is IB's simplified mobile app for casual investors. It offers a streamlined interface for buying/selling stocks, ETFs, and fractional shares. It does NOT support futures, options, API access, or advanced order types. If you need automation or advanced features, use the main IBKR Mobile app or TWS.
In TWS: right-click a symbol → Create Alert. Set conditions based on price, volume, margin, percentage change, or time. Alerts can trigger: popup, sound, email, SMS, or order submission. On IBKR Mobile: tap the bell icon on any quote. Alerts persist across sessions and work even when TWS is closed (server-side).
Client Portal supports basic trading (stocks, options, forex), but it's significantly less capable than TWS. For active trading, TWS or IBKR Mobile are better choices. Client Portal is best for account management, reporting, and occasional trades.
Yes. IB offers a TWS demo at interactivebrokers.com/en/trading/tws-demo.php. No registration required. The demo uses simulated data and lets you explore TWS features, but it doesn't connect to real markets or support API access. For API testing, you need a real account with the paper trading mode enabled.
Client Portal → Help → Message Center (ticket system, usually 1-2 business days). Phone support: available 24/6 at country-specific numbers listed on the IB website. Live chat: available in Client Portal during business hours. IB's support is known for being technically knowledgeable but sometimes slow to respond. For API-specific questions, the IB API forum and community resources are often faster.
16. Troubleshooting
IB auto-liquidates when your account falls below maintenance margin. Unlike other brokers, IB does not issue margin calls -- it liquidates directly and automatically. This can happen during volatile moves even when you're away. Prevention: maintain adequate margin cushion (watch the "Cushion" metric), use smaller position sizes, and set up margin warning alerts in TWS/mobile.
Common rejection reasons: 1. Insufficient margin/buying power. 2. Missing trading permissions (enable in Account Management → Trading Permissions). 3. Market order outside trading hours (use limit orders). 4. PDT restriction (need $25K for day trading). 5. Penny stock restrictions. 6. Short selling restrictions (stock not borrowable). 7. Price cap limits on options orders. Check the TWS error message for the specific reason.
1. Increase Java memory: File → Global Configuration → General → increase memory allocation to 4096MB. 2. Close unused watchlists, charts, and windows. 3. Reduce the number of active market data subscriptions. 4. Restart TWS periodically (especially after running for days). 5. Use the Stable version instead of Latest. 6. Close browser tabs -- Java and browser compete for RAM.
IB's API reflects 25+ years of features across every asset class and 150+ exchanges. The complexity comes from: asynchronous callback architecture, event-based error handling (no exceptions), strict rate limiting, mandatory TWS/Gateway dependency, and IB-specific conventions. This is a common frustration -- "IB is a great brokerage with terrible APIs" is one of the most upvoted sentiments on r/algotrading. The trade-off is unmatched market access and features.
Error 200 means IB can't match your contract specification. Fixes: 1. Add the primary exchange (e.g., NASDAQ for AAPL). 2. Use the unique conId instead of symbol. 3. For futures, specify the exact expiry date. 4. Check IB's symbology -- some symbols differ from other platforms (e.g., BRK B not BRK.B). 5. The contract may have expired or been delisted.
A negative cash balance doesn't necessarily mean you owe money. Common causes: 1. Margin loan (you borrowed to buy securities). 2. Option assignment resulted in a stock purchase exceeding your cash. 3. Currency mismatch (positive in one currency, negative in another). 4. Unsettled trades (T+1 settlement for stocks). Check Net Liquidation Value -- if that's positive, your overall account is fine.
Reddit: r/interactivebrokers and r/algotrading have active IB communities.
IB Knowledge Base: ibkrguides.com has step-by-step tutorials.
groups.io/g/ib-async: Active forum for API-related questions.
IB API docs: interactivebrokers.github.io/tws-api/ (official reference).
Stack Overflow: Search for "interactive-brokers" tag.
PickMyTrade support: For automation-specific questions, our team responds within hours.
For bugs: Client Portal → Help → Message Center → create a ticket with specific reproduction steps, screenshots, and your TWS version. For API issues: include the error code, API version, and minimal reproduction code. IB's engineering team monitors tickets but response times vary from hours to weeks depending on severity.
If this was an auto-liquidation: IB's liquidation algorithm prioritizes speed over price. You can file a complaint through the Message Center, but IB typically upholds auto-liquidation decisions. Prevention is key -- maintain adequate margin cushion.
If this was a stop order triggered during a flash crash: stop orders become market orders, which can fill far from the trigger price. Use stop-limit orders for protection against extreme slippage, or trailing stops that adjust with the market.
TWS API docs: interactivebrokers.github.io/tws-api/
Knowledge Base: ibkrguides.com
Video tutorials: IB's Traders' Academy (tradersacademy.online)
Product listings: interactivebrokers.com/en/trading/products-tab.php
Fee schedule: interactivebrokers.com/en/trading/commissions.php
Release notes: interactivebrokers.com/en/software/tws/releaseNotes.php
Compiled by the PickMyTrade Team. Building automation infrastructure for 10,000+ traders since 2023.
Last updated: April 2026 | Questions? Join our Discord community or contact [email protected]
Automate Your IB Trading Today
Connect TradingView to Interactive Brokers with no code. Start your 5-day free trial — no credit card required.