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.

160+
Questions Answered
16
Categories
1100+
Sources Analyzed

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.

1. Getting Started with Interactive Brokers

What is Interactive Brokers and who is it best for?

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.

What is the difference between IBKR Pro and IBKR Lite?

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.

What are the minimum account requirements to open an IB account?

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.

How long does it take to open an Interactive Brokers account?

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.

What asset classes can I trade on Interactive Brokers?

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)
Can I trade from outside the United States?

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.

What trading platforms does IB offer?

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.

How do I fund my Interactive Brokers account?

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.

Is Interactive Brokers safe? How are my funds protected?

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.

Does IB support fractional shares?

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

What are Interactive Brokers' commission rates?

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.

Are there any monthly fees or inactivity charges?

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).

How does margin work at Interactive Brokers?

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).

What is the Pattern Day Trader (PDT) rule and how does IB enforce it?

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.

What are market data subscription costs?

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.

Does IB charge for real-time data if I don't subscribe?

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.

How does IB's commission structure compare to other brokers?

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.

What happens if my account goes negative or I get a margin call?

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.

Are there currency conversion fees?

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.

Can I earn interest on my idle cash at IB?

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

How do I download and install Trader Workstation (TWS)?

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.

What is IB Gateway and should I use it instead of TWS?

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.

How do I enable API access in TWS?

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.

What are the default API port numbers?

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.

Why does TWS restart every night and how do I handle it?

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.

PickMyTrade manages all connection lifecycle automatically. No nightly disconnect worries -- your TradingView alerts execute reliably 24/7.
How do I set up TWS or IB Gateway on a Linux server?

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.

What is IBC (IBController) and do I need it?

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.

How much RAM and CPU does TWS/Gateway need?

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.

Can I run TWS and IB Gateway at the same time?

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.

How do I keep TWS/Gateway running 24/7 for automated trading?

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.

Don't want to manage servers, Docker, or IBC? PickMyTrade handles all infrastructure -- connect your IB account and automate from TradingView in 2 minutes.

4. Connection & Authentication

Why can't I connect to TWS/Gateway? Common connection errors

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.
How does two-factor authentication (2FA) work with IB?

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.

My connection drops randomly during trading hours -- why?

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.

How many simultaneous API connections can I have?

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.

What does the "Competing live session" error mean?

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.

Can I connect to IB from a remote server or cloud?

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
How do I handle the weekly 2FA re-authentication in production?

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.
Can I connect to IB without TWS or Gateway running?

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.

Why does IB log me out of the website when Gateway is running?

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.

How do I prevent connection drops during overnight trading?

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

What market data subscriptions do I need?

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.

Why am I seeing delayed data instead of real-time quotes?

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.

What are IB's historical data limitations?

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.

Why does my chart data not match TradingView or Yahoo Finance?

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.

Can I get historical data for delisted stocks or expired futures?

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.

Why is the historical data download so slow?

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.

What is a Flex Report and how do I use it?

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.

Is IB's tick-by-tick data truly tick-by-tick?

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.

Why is IB's historical data always unavailable on weekends?

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.

How do I get Level 2 (depth of market) data?

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

What order types does Interactive Brokers support?

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
What is SMART order routing and should I use it?

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).

Why is my order stuck in "PendingSubmit" status?

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.

Can I place orders outside regular trading hours?

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.

What is the Order Efficiency Ratio (OER) and why does it matter?

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.

How do I cancel all open orders at once?

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.

What does "Duplicate order id" error mean?

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.

How do IB's adaptive algorithms work (TWAP, VWAP, Adaptive)?

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.

Can I preview the margin impact before placing an order?

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.

What is the maximum message rate for the IB API?

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

What is a bracket order and how do I create one?

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.

PickMyTrade supports bracket orders natively from TradingView alerts. Just include SL/TP values in your alert JSON -- no complex API coding needed.
How do trailing stops work on IB?

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.

Can I have multiple take-profit targets on a single position?

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.

PickMyTrade handles multiple take-profit targets automatically. Define partial exits in your TradingView alert and the platform manages the complexity.
Why can't I modify my bracket order after the parent fills?

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.

What is an OCA (One-Cancels-All) order group?

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.

How do I attach a stop loss to an existing position?

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.

What's the difference between a Stop and a Stop-Limit order?

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.

Do trailing stops work during pre-market and after-hours?

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.

Can I combine a bracket order with a trailing stop?

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.

How do conditional orders work on IB?

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

How do I access the options chain in TWS?

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.

What options market data subscription do I need?

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).

How do I see real-time Greeks (delta, gamma, theta, vega) in TWS?

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.

How do I place a multi-leg options spread?

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.

Why are options fills sometimes worse than the displayed bid/ask?

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.

Can I exercise options early via IB?

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.

How does IB handle options assignment?

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.

What happens at options expiration on IB?

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.

Can I trade 0DTE (zero days to expiration) options on IB?

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.

How do I get historical implied volatility data from IB?

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

What futures exchanges and products does IB support?

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).

What are micro futures and what do they cost on IB?

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).

How does futures margin work on IB?

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.

How do I roll a futures position to the next contract?

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.

Why don't I see futures data -- everything shows as N/A?

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.

What are continuous futures and can I trade them on IB?

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).

Are futures exempt from the Pattern Day Trader (PDT) rule?

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.

What trading hours do futures have on IB?

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.

How do I automate futures trading from TradingView alerts?

TradingView's native IB integration doesn't support automated futures execution from alerts. You need middleware:

PickMyTrade specializes in TradingView-to-futures automation. Connect your IB account, set up your alert JSON with the contract details, and your Pine Script strategy executes directly on ES, NQ, CL, or any futures contract. Supports bracket orders and trailing stops out of the box.
How does IB compare to other futures brokers (NinjaTrader, Tradovate)?

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

How do I view my current positions and unrealized P&L?

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.

Why does my P&L show differently in TWS vs the mobile app?

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.

How do I get my daily P&L and trading history?

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.

What cost basis method does IB use (FIFO, LIFO, average)?

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.

How do I check my buying power and available margin?

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.

Why does account data only update every few minutes?

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.

How do I export my trade history for taxes?

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.

Can I earn interest on short stock proceeds?

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.

What is the Stock Yield Enhancement Program?

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.

How do I reconcile positions between my trading system and IB?

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

What APIs does Interactive Brokers offer?

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.
What Python libraries are available for the IB API?

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.

What happened to ib_insync? Is it still safe to use?

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 *.

What is the biggest challenge with IB API automation?

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
PickMyTrade eliminates all 5 of these challenges. No connection management, no asyncio, no error handling, no rate limits, no complex order coding. Just webhook → execution.
Can I automate IB trading without any coding?

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.
How do I deploy an IB trading bot on a VPS?

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).

Is IB fast enough for algorithmic trading?

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.

What programming languages does the IB API support?

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.

Can I use IB with QuantConnect or Backtrader?

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

Can I connect TradingView to Interactive Brokers for automated trading?

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.
PickMyTrade connects TradingView to IB in 2 minutes. Generate a webhook URL, paste it in your alert, and your strategy goes live across stocks, futures, options, and forex.
What are the limitations of TradingView's native IB integration?

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

Do I need a TradingView Pro subscription for webhooks?

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.

What's the typical latency from TradingView alert to IB fill?

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.

How do I format TradingView alert messages for IB automation?

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.

Can I route TradingView alerts to multiple IB accounts?

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.

Can I automate TradingView strategies for futures on IB?

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.

How do I build a custom TradingView-to-IB webhook bridge?

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.

Why do my TradingView alerts sometimes not fire?

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.

Can I use TradingView alerts for crypto trading on IB?

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

How do I set up paper trading on IB?

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).

Does paper trading use real market data?

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.

Why are paper trading fills unrealistic?

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.).

Can I use IBKR Lite for paper trading?

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.

How do I reset my paper trading account balance?

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.

Can IB close my paper trading account?

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.

How do paper trading fills differ from live?

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.

Can I paper trade futures and options?

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.

Should I test my automation on paper before going 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.

How do I switch between paper and live in my code?

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

Can I manage multiple IB accounts from one interface?

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.

What is a Financial Advisor (FA) account?

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.

How do I create a secondary username for API trading?

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.

Can I run multiple trading strategies on one IB account?

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.

What happens if two scripts use the same clientId?

The second connection kicks out the first. IB only allows one active connection per clientId. Use unique clientIds for each script.

What is clientId=0 and when should I use it?

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.

How does PickMyTrade handle multi-account execution?

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).

Can the master clientId (0) cancel other clients' orders?

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.

How do I allocate orders across sub-accounts in an FA setup?

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.

How do I keep track of which positions belong to which strategy?

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

What can I do with the IBKR Mobile app?

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.

What is Client Portal and what can I do there?

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.

Can I trade on IB from my phone while my bot is running?

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.

Does IB support two-factor authentication via biometrics?

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.

Can I access IB from any country?

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.

What is IBKR GlobalTrader?

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.

How do I set up price alerts on IB?

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).

Can I use IB's web trading interface for day-to-day trading?

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.

Does IB offer a demo account without signing up?

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.

How do I contact IB customer support?

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 liquidated my position without warning -- what happened?

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.

Why are my orders being rejected?

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.

TWS is running slow or freezing -- how do I fix it?

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.

Why does IB's API feel so complicated compared to other brokers?

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.

This is exactly why PickMyTrade exists -- to give you IB's powerful execution without any of the API complexity. Just TradingView alerts → live trades.
"No security definition found" error -- how to fix?

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.

Why does my account show a negative cash balance?

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.

IB customer support is slow -- where else can I get help?

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.

How do I report a bug or issue to IB?

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.

My position was closed at a terrible price -- what can I do?

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.

Where can I find IB's official documentation?

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.