Error messages

TWS error 162: diagnose the historical data message

Quick answer

Error 162 is a historical-data service message with several possible causes. The text can describe missing permission, pacing, or unavailable data. Preserve the whole message and check the request parameters.

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

Step by step

  1. 1 Save the full app message first. To check a recorded TWS API log, open Help → Troubleshooting → Diagnostics → API Logs. Select its date and choose View Logs. If the list is empty, enable API logging before the next event.
  2. 2 Copy the full 162 message, contract, date range, and bar size.
  3. 3 Check whether the reason mentions permission, request rate, or missing data.
  4. 4 For permission issues, check the exact exchange and user data access. For rate issues, slow the requesting app.
  5. 5 For missing data, compare a smaller available range and the contract’s expiry.
  6. 6 Repeat only the corrected request and record the result.

A practical example

You ask for a year of small chart bars and get 162. Do not stop at the number. One full message may say you sent requests too fast. Another may say that the date range has no data. Try to answer three plain questions: Which contract did I ask for? Which dates did I ask for? What does the rest of the message say? Keep those answers with the bar size and the time of the request. That gives support a small case to check. It also helps you avoid changing a feed subscription when the real issue is an old expiry or a burst of requests.

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

Screen reference

TWS View Logs dialog with View Logs, Export Logs and Export Today Logs buttons
This session has no recorded API logs in the list, so export buttons are disabled. Enable API logging before the event you need to capture. No log was exported or uploaded for this screenshot. Captured in TWS paper mode on 3 October 2026. Open the image for full size.
Help, Troubleshooting, Diagnostics menu leading to API Logs
In this build, follow Help → Troubleshooting → Diagnostics → API Logs. Upload Diagnostics is a different action. Captured in TWS paper mode on 3 October 2026. Open the image for full size.
TWS Market Data Connections with farm purpose and status, plus API client columns
The observed services are connected and the API client list is empty. Use this panel to read current status; it does not reproduce a disconnect or prove an app handshake completed. Captured in TWS paper mode on 3 October 2026. Open the image for full size.
TWS Chart Parameters showing time period, data type, bar type, volume, VWAP and session controls
Compare Time period and What to show first. Additional Data and Features contains Volume and VWAP of the bar. Chart Time Options contains the extended-hours and user-time-zone controls. The dialog was closed with Cancel; no settings were applied. Captured in TWS paper mode on 3 October 2026. Open the image for full size.
How to confirm the result The query should return the expected historical interval or a clear, documented availability limit.

Mistake to avoid

Do not label every 162 a pacing violation. That can send users toward the wrong fix.

Common questions

Can expired options have missing history?

Historical availability has product-specific limits. Check the requested contract and period.

Does 162 mean live quotes are down?

Not necessarily. It refers to the historical request.

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