Contracts and account checks

TWS and API P&L differ: compare the definitions

Quick answer

First name what each P&L number shows: today’s result, closed trades, or an open position. Match the account, product, currency, and time. Two numbers can differ because they measure different things. Do not use the gap alone to decide that a trade failed.

Educational software guidance. Trading involves risk. Read the financial and information disclaimers.

Step by step

  1. 1 Open Account → Account Window. Name the exact field in each view. The Market Value and Portfolio headers label unrealized P&L and realized P&L as separate fields; a daily total is a different measure.
  2. 2 Match the account and contract scope, including any aggregate account view.
  3. 3 Check the currency and the time of each observation.
  4. 4 Compare the broker’s executions and current position used in the calculation.
  5. 5 If a difference remains, give support the field names and a timestamped example.

A practical example

One panel shows today’s result and another shows the open position’s unrealized result. Those numbers need not be equal. First label each number by what it measures. Match account, currency, and time as well. A small table with those labels is more useful than a screenshot with two circles around different totals. Once the definitions match, a remaining gap is easier to report.

Illustrative scenario, not a record of a trade placed during this review.

Screen reference

Portfolio columns including position, market value, average price, unrealized and realized P&L
This is the empty paper portfolio’s header. No holdings or account values are displayed. Compare field definitions and scope, not just two numbers with similar labels. Captured in TWS paper mode on 3 October 2026. Open the image for full size.
TWS Account menu with Account Window, data subscription and trading permission entries
Account Window displays balances and portfolio fields. Subscribe to Market Data/Research and Trading Permissions lead to separate account-management checks. No subscription or permission was changed. Captured in TWS paper mode on 3 October 2026. Open the image for full size.
Market Value - Real FX Balance heading with cash and P&L column labels
This capture shows only the section heading and column labels. Actual currency balances and account totals are excluded. Captured in TWS paper mode on 3 October 2026. Open the image for full size.
TWS API Settings showing socket clients, read-only access, port and logging
Find the named control in API → Settings. The displayed values belong to a paper session and are examples, not universal recommendations. Captured in TWS paper mode on 3 October 2026. Open the image for full size.
How to confirm the result The comparison should use matching P&L definitions and the same position scope.

Mistake to avoid

Do not use a display mismatch alone as evidence that an order failed or that funds are missing.

Common questions

Is daily P&L the same as realized P&L?

No. Confirm the definition of each field.

Can API and UI updates arrive at different times?

Check timestamps and refresh behavior before comparing values.

Financial and information disclaimers

Financial disclaimer

These guides explain software. They are for education, not financial, investment, tax, or legal advice. No example is a suggestion to buy or sell a product or use a trading strategy. Trading can lose money, including all funds you put at risk. With margin, futures, short sales, or some options, losses can exceed your starting funds. Automation can fail, send duplicate orders, or act late. Stops do not guarantee a fill or a price. Review your orders and positions, and seek advice from a qualified professional for your own needs. Paper trades, examples, and past results do not predict live results or promise a profit.

Information disclaimer

This is general help based on the sources and check date shown on the page. Screens, settings, fees, data access, and product support can change or differ by app version, account, country, and broker. The content may contain errors or become out of date; accuracy, completeness, and continuous service are not guaranteed. Check current broker and app instructions before acting. Screenshots show where controls are; they do not prove that an order test passed. This guide does not replace broker terms or risk notices. References to IBKR and TradingView identify their products and do not imply their endorsement of this guide.

IBKR risk disclosures · IBKR paper-trading limits · SEC guidance on automated investment tools

PickMyTrade help · Independent guidance for Trader Workstation and the desktop integration. TWS images show paper trading. Other applications are named in the image captions. Settings and availability can vary by version and account.

Automate TradingView alerts to Interactive Brokers

See the IBKR integration