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:
- Real-time market data (delayed 15 min by default, real-time if you have a live data subscription)
- $1,000,000 simulated cash to trade with
- All order types — market, limit, stop, bracket, OCA, conditional
- API access — same TWS API/IB Gateway works for paper trading
- Portfolio tracking — positions, P&L, margin calculations
---
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 InMethod 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 parallelThe Port Convention
IB uses a standard port convention that every algo trader should memorize:
| Platform | Live Port | Paper Port |
|---|---|---|
| TWS | 7496 | 7497 |
| IB Gateway | 4001 | 4002 |
---
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 accountTo 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:
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:
- Certain exotic options strategies
- Some fixed income products
- A few regional exchanges
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
| Scenario | Use Paper | Use Live |
|---|---|---|
| Testing a new strategy | Yes | No |
| Learning the TWS/Desktop interface | Yes | No |
| Testing API code changes | Yes | No |
| Validating order types (bracket, conditional) | Yes | No |
| Gauging real slippage and fill quality | No | Yes (small size) |
| Running a proven strategy | No | Yes |
| Testing during market hours with real data | Yes (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 moneyOnce 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.*