📖 Guides

Interactive Brokers Paper Trading: How to Set Up and Switch Between Live & Demo (2026)

⚠️ Disclosure: Some links on this page are affiliate links. If you sign up through them, I may earn a commission — at no extra cost to you. I only review tools I actually use.
# Interactive Brokers Paper Trading: How to Set Up and Switch Between Live & Demo (2026)

If you just opened an Interactive Brokers account and want to practice before risking real money, paper trading is the single best feature IB offers — and it is completely free.

But here is the problem: the setup is not obvious. You need to enable it separately, log in with a different username format, and the switching workflow differs between TWS and IBKR Desktop. I have run a live USDJPY momentum strategy on IB for over a year and still use paper trading to test every code change before deploying to production.

This guide covers everything: opening a paper account, configuring it, switching between live and demo, and the gotchas that trip up new users.

---

What Is IB Paper Trading?

Paper trading on Interactive Brokers gives you a simulated environment with:

It mirrors the live environment almost exactly. The only differences: fills are simulated (you always get filled at the displayed price), and there is no real market impact.

---

Step 1: Enable Your Paper Trading Account

Paper trading is not enabled by default. Here is how to turn it on:

1. Log in to Client Portal (portal.interactivebrokers.com)

2. Navigate to Settings → Account Settings 3. Under Trading, find Paper Trading Account 4. Click Create or Enable 5. Your paper trading username will be your live username with a DU prefix — for example, if your live username is U12345678, your paper username is DU12345678

> Important: The paper account shares your market data subscriptions with your live account. If you subscribe to real-time forex data on your live account, paper trading gets it too.

---

Step 2: Log In to Paper Trading on TWS

Trader Workstation (TWS) is where most serious IB users trade. Here is how to access paper trading:

Method 1: Login Screen Toggle

1. Open TWS

2. On the login screen, check the box that says Paper Trading (bottom-left area) 3. Enter your paper username (DU prefix) and your regular password 4. Click Log In

Method 2: Separate TWS Instance

If you want live and paper running simultaneously:

1. Install a second TWS instance in a different directory

2. Configure one for live (port 7496) and one for paper (port 7497) 3. This is essential for API-based trading — you can test on paper while live runs in parallel

The Port Convention

IB uses a standard port convention that every algo trader should memorize:

PlatformLive PortPaper Port
TWS74967497
IB Gateway40014002
When connecting via the Python API (or any other language), you switch between live and paper simply by changing the port number. No other code changes needed.

---

Step 3: Paper Trading on IBKR Desktop

IBKR Desktop is IB's newer, more modern platform. The paper trading flow is slightly different:

1. Open IBKR Desktop

2. Click the profile icon (top-right corner) 3. Select Switch to Paper Trading 4. IBKR Desktop will reconnect using your paper account

To switch back to live:

1. Click the profile icon again

2. Select Switch to Live Trading 3. Confirm the switch

> Note: IBKR Desktop does not support running live and paper simultaneously in the same window. Use TWS if you need both open at once.

---

Step 4: Paper Trading via IB Gateway (For Algo Traders)

If you run automated strategies like I do, IB Gateway is the lightweight headless option:

1. Launch IB Gateway

2. On the login screen, select Paper Trading mode 3. Enter your paper credentials 4. Gateway connects on port 4002 (vs 4001 for live)

My Actual Workflow

Here is how I use paper trading in production development:

# config.py
import os

# Switch between live and paper with one environment variable
TRADING_MODE = os.getenv("IB_MODE", "paper")

IB_CONFIG = {
    "live": {"host": "127.0.0.1", "port": 4001, "client_id": 1},
    "paper": {"host": "127.0.0.1", "port": 4002, "client_id": 2},
}

config = IB_CONFIG[TRADING_MODE]

Every strategy change goes through this cycle:

💡 Interactive Brokers

Like what you're reading? Try it yourself — this link supports ChartedTrader at no cost to you.

Open an Interactive Brokers account →

1. Code the change

2. Test on paper (port 4002) for at least 2-3 trading sessions 3. Verify fills, P&L calculations, and risk checks 4. Deploy to live (port 4001)

This has saved me from deploying bugs that would have cost real money — including a momentum signal inversion bug that would have shorted when it should have gone long.

---

Step 5: Reset Your Paper Trading Account

After a while, your paper account might have positions you do not want or a balance that does not reflect reality. Here is how to reset:

1. Log in to Client Portal (live account)

2. Go to Settings → Account Settings 3. Find Paper Trading Account 4. Click Reset 5. This restores the default $1,000,000 balance and clears all positions

> Warning: Reset is irreversible. All open positions, pending orders, and trade history in the paper account will be wiped.

---

Paper Trading Gotchas (Things That Tripped Me Up)

1. Fills Are Too Optimistic

Paper trading always fills you at the displayed bid/ask. In real markets, especially during news events or for illiquid instruments, you will experience slippage. Do not trust paper P&L at face value.

My rule: If a strategy is marginally profitable on paper, it will likely lose money live. I need at least a 20% performance buffer on paper before going live.

2. Market Data Might Be Delayed

If you do not have a live market data subscription, paper trading shows 15-minute delayed data. This is useless for anything intraday.

Fix: Subscribe to the data feed you need on your live account. Paper trading inherits those subscriptions. For forex, the Ideal FX bundle costs about $3/month and covers all major pairs in real-time.

3. Paper Account Cannot Trade Everything

Some products are not available in paper trading:

For standard stocks, ETFs, futures, forex, and options on major exchanges — paper trading works fine.

4. Two-Factor Authentication (2FA)

Paper trading uses the same 2FA as your live account. If you use IB Key on your phone, you need to approve the login for paper trading too. This is especially annoying when running both live and paper IB Gateway instances — each login triggers a separate 2FA prompt.

Tip: Schedule your paper and live Gateway restarts at different times so you do not get two 2FA prompts simultaneously.

5. Order Types Behave Slightly Differently

Conditional orders, OCA groups, and bracket orders work in paper trading but the trigger logic is based on simulated fills. In live trading, these triggers depend on actual exchange execution reports, which can behave differently during fast markets.

---

When to Use Paper Trading vs. When to Go Live

ScenarioUse PaperUse Live
Testing a new strategyYesNo
Learning the TWS/Desktop interfaceYesNo
Testing API code changesYesNo
Validating order types (bracket, conditional)YesNo
Gauging real slippage and fill qualityNoYes (small size)
Running a proven strategyNoYes
Testing during market hours with real dataYes (with data sub)Yes

My Recommendation

Start with paper trading for at least 2 weeks before putting real money in. Use that time to:

1. Get comfortable with TWS or IBKR Desktop navigation

2. Place at least 20 practice trades across different order types 3. If you are coding a bot, run it on paper for a full trading week 4. Track your paper P&L in a spreadsheet — treat it like real money

Once you are consistently executing your plan without mistakes on paper, switch to live with minimum position sizes first. Scale up only after your live results match your paper expectations.

---

Paper Trading for IB Gateway (Headless/Server Setup)

If you are running IB Gateway on a headless server (like I do for my USDJPY strategy), here is the paper trading checklist:

1. In IB Gateway config, set tradingMode to paper

2. Verify connection on port 4002 3. Check that account ID shows the DU prefix in logs 4. Run your strategy with paper config for at least one full trading session before switching to live

# Quick connection test
from ibapi.client import EClient
from ibapi.wrapper import EWrapper
import threading, time

class TestApp(EClient, EWrapper):
    def __init__(self):
        EClient.__init__(self, self)
    def nextValidId(self, orderId):
        print(f"Connected to paper! Next order ID: {orderId}")
        self.disconnect()

app = TestApp()
app.connect("127.0.0.1", 4002, clientId=99)  # 4002 = paper
thread = threading.Thread(target=app.run)
thread.start()
time.sleep(3)

---

FAQ

Can I run live and paper trading at the same time?

Yes, but only on TWS or IB Gateway. Install two separate instances and run them on different ports. IBKR Desktop does not support simultaneous live and paper sessions.

Does paper trading cost anything?

No. Paper trading is completely free. The only cost is market data subscriptions, which you would need for live trading anyway.

Can I import my live positions into paper trading?

No. Paper and live accounts are completely separate. You start with $1M simulated cash and build from there.

Is paper trading available on mobile?

Yes. The IBKR Mobile app supports paper trading. Switch via the account menu, similar to IBKR Desktop.

How realistic are paper trading fills?

Fills are executed at the current displayed price with no slippage simulation. For liquid instruments (SPY, AAPL, EUR/USD), this is reasonably close to reality. For illiquid instruments or during volatile periods, expect significantly better fills on paper than you would get live.

---

Start Paper Trading Today

Paper trading is the safest way to learn Interactive Brokers before committing real capital. Whether you are a manual trader learning the platform or a developer building automated strategies, the paper environment gives you everything you need to build confidence.

Open an Interactive Brokers account — paper trading is free with any account type, including the basic Individual account.

Once you have practiced enough, check out our guide on building a Python momentum strategy with IB to see how paper trading fits into a real automated trading workflow.

*This article contains affiliate links. We may earn a commission if you open an account through our links, at no extra cost to you. All opinions are based on firsthand experience running a live IB trading system.*

Interactive Brokers

Ready to get started? Use the link below — it helps support ChartedTrader at no cost to you.

Open an Interactive Brokers account →
📈

About the author

I'm a systematic trader running live strategies on IB (USDJPY momentum) and Hyperliquid (crypto perps). Every tool reviewed here is something I've used with real capital. Questions? Reach out.

📚 Related Articles

📖 Guides

How to Trade the Magnificent 7 on OKX: Equity Perpetual Swaps Step by Step (2026)

OKX launched 23 equity perpetual swaps on March 24, 2026 — including all Magnificent 7 stocks. This guide walks through every step: finding the contracts, using crypto as collateral, setting leverage, and managing positions 24/7 with Auto Earn yield still running.

March 25, 2026 ⏱ 12 min read
📖 Guides

Interactive Brokers AI Screener: Find Stocks with Plain English in IBKR Desktop (2026 Guide)

IBKR Desktop's AI Screener lets you find stocks by typing plain English instead of navigating complex filters. Step-by-step setup with 7 real query examples, limitations to know, and how to combine it with MultiSort for a better screening workflow.

March 24, 2026 ⏱ 12 min read
📖 Guides

Grayscale HYPE ETF Filing: What It Means for Hyperliquid Traders (2026 Guide)

Grayscale filed an S-1 for a HYPE ETF (ticker GHYP) on Nasdaq on March 20, 2026. Three firms are now racing to list HYPE ETFs. Here is what this means for current HYPE holders, stakers, and Hyperliquid traders — and whether buying before approval makes sense.

March 22, 2026 ⏱ 9 min read

📬 Get weekly trading insights

Real trades, honest reviews, no fluff. One email per week.