Wiki

Description

Interactive Brokers

What is Interactive Brokers?

Interactive Brokers (IB) is a brokerage that can be used with TWM in two ways:

  1. As a broker — to execute trades on stocks, futures, and other instruments
  2. As a data source — to receive market data, if you have active IB market data subscriptions


To use Interactive Brokers with TWM, you need an active Interactive Brokers account.

Requirements Before Connecting

Before you can connect TWM to Interactive Brokers, you must:

  1. Have an Interactive Brokers account — Sign up at interactivebrokers.com if you don't have one.
  2. Install and run one of the following applications:
  3. TWS (Trader Workstation) — the full IB trading terminal
  4. IB Gateway — a lightweight alternative to TWS


Why do I need TWS or IB Gateway running?

TWM connects to Interactive Brokers through the IB API (not through REST or WebSocket). This means TWS or IB Gateway must be running locally on your computer for TWM to communicate with Interactive Brokers.

TWS (Trader Workstation)

TWS is Interactive Brokers' full-featured trading terminal.

How to download and install TWS:

1. Go to the Interactive Brokers download page: https://www.interactivebrokers.com/en/trading/download-tws.php

Image

2. Download the Latest version for your operating system.

3. Install TWS following the standard installation process.

4. Launch TWS.

Image

5. Log in with your Interactive Brokers credentials. Note: Interactive Brokers may require two-factor authentication (2FA). You will need to confirm the login via the IBKR Mobile app or your configured authenticator.

Image

6. Make sure the API settings in TWS are configured to allow connections. Go to Settings > Global Configuration > API > Settings and ensure:

  1. "Enable ActiveX and Socket Clients" is checked
  2. The Socket port is noted (default is usually 7496 for live)
Image


Image


IB Gateway

IB Gateway is a lighter alternative to TWS. It provides the same API connectivity but without the full trading terminal interface. Use IB Gateway if you don't need the TWS interface and prefer a minimal application running in the background.

How to download and install IB Gateway:

1. Go to the Interactive Brokers download page and find the IB Gateway section: interactivebrokers.com/en/trading/ibgateway-latest.php

Image

2. Download and install IB Gateway.

3. Launch IB Gateway and log in with your Interactive Brokers credentials.

Image

4. Once logged in, IB Gateway will show a minimal interface confirming the connection is active.

Image

5. Make sure the API settings in IB Gateway are configured to allow connections. Go to Configure > Settings > API > Settings and ensure:

  1. "Read-Only API" is unchecked
  2. The Socket port is noted (default is usually 7496 for live)
ImageImage


Either TWS or IB Gateway will work with TWM — choose whichever you prefer.

Connecting Interactive Brokers in TWM

To set up an Interactive Brokers connection in TWM:

  1. Open TWM and go to the Connections panel.
  2. Click Add Connection and select Interactive Brokers.
  3. Fill in the connection fields:
  4. Login — your Interactive Brokers username
  5. Password — your Interactive Brokers password
  6. Live Trading — enable this for live trading
Image

  1. The connection should now be active.


Important: Trading Mode Limitations

Mode
Live TradingYes
Paper Trading (IB)No — not supported
Sim Trading (TWM)Yes — TWM's built-in simulator works

Interactive Brokers Paper Trading accounts are not supported in TWM. If you want to practice without risking real money, use TWM's built-in Sim Trading feature instead.

Trade Permissions

To trade specific instrument types through Interactive Brokers, you must have the appropriate trade permissions enabled in your IB account.

Examples:

  1. To trade futures, you need Futures trading permissions
  2. To trade stocks, you need Stock trading permissions


How to check and enable trade permissions:

1. Log in to the Interactive Brokers Client Portal.

2. Navigate to Trade > Trading Permissions.

ImageImage

3. Enable the permissions for the instrument types you want to trade.


Note: For some permissions, Interactive Brokers may require you to complete a questionnaire or knowledge test before granting access. This is a standard IB requirement.

Market Data Subscriptions in IB

If you want to receive market data directly from Interactive Brokers (instead of from DXFeed), you must have active market data subscriptions in your IB account.

How to subscribe to IB market data:

1. Log in to the Interactive Brokers Client Portal.

2. Navigate to Settings > User Settings > Market Data Subscriptions.

ImageImage

3. Browse available market data packages and subscribe to the ones you need.

Image


Note: IB market data subscriptions are not required if you are using DXFeed as your data source. You only need them if you want to receive data directly from Interactive Brokers.

Historical Data Limitations

Interactive Brokers has limitations on downloading historical data:

  1. Small timeframes (such as 1-minute or 15-minute bars) are not supported for historical data through IB in TWM.
  2. TWM limits IB historical data to larger timeframes:
  3. Hourly
  4. Daily
  5. Weekly
  6. and above


For active charting and analysis with smaller timeframes, it is recommended to use DXFeed as your market data source and use Interactive Brokers primarily as a broker for trade execution.

Summary

After reading this section, you should understand:

  1. That Interactive Brokers can be used as a broker and/or data source
  2. That TWS or IB Gateway must be running locally for TWM to connect
  3. How to download, install, and configure TWS or IB Gateway
  4. How to set up the IB connection in TWM
  5. That only Live Trading is supported (not IB Paper Trading)
  6. How to enable trade permissions for different instrument types
  7. How to subscribe to IB market data (optional if using DXFeed)
  8. That IB historical data is limited to larger timeframes


Necessary cookies help make the website usable by enabling basic functions such as consent storage, security protection, language preferences, and authentication.

  • Necessary cookies

    UserUUID

    Technical identifier used to manage and persist cookie consent preferences.

    Maximum storage duration: 12 Months | Type: Necessary cookies
    consent

    Stores your cookie consent choices and selected preferences.

    Maximum storage duration: 12 Months | Type: Necessary cookies
    .AspNet.Consent

    Indicates whether the user has provided cookie consent.

    Maximum storage duration: 1 Year | Type: Necessary cookies
    .AspNetCore.Antiforgery

    Used to prevent CSRF attacks and protect form submissions and user data.

    Maximum storage duration: Session | Type: Necessary cookies
    .AspNetCore.Cookies

    Used to manage authentication information and signed-in sessions.

    Maximum storage duration: 1 Year | Type: Necessary cookies
    .AspNetCore.Culture

    Stores the user’s language and localization preferences.

    Maximum storage duration: 1 Year | Type: Necessary cookies

Functional cookies allow the website to remember preferences and support enhanced features or integrations such as Google services, maps, embedded media, or account-related personalization.

  • Functional Cookies

    LSOLH

    Used by Google to store session information and support service-related functionality.


    Maximum storage duration: Session | Type: Functional Cookies
    COMPASS

    Used by Google to remember settings and improve navigation across integrated services.

    Maximum storage duration: 6 Months | Type: Functional Cookies
    ACCOUNT_CHOOSER

    Remembers which Google accounts have been used on the device.

    Maximum storage duration: 1 Year | Type: Functional Cookies
    APISID

    Used by Google to store preferences and information when using integrated Google services such as Maps.

    Maximum storage duration: 2 Years | Type: Functional Cookies
    LSID

    Used by Google to store preferences while viewing pages that incorporate Google services.

    Maximum storage duration: 2 Years | Type: Functional Cookies
    SAPISID

    Used by Google services to support embedded content, maps, and account-related personalization.

    Maximum storage duration: 2 Years | Type: Functional Cookies
    __Host-GAPS

    Used by Google to support service preferences and related functionality on pages integrating Google services.

    Maximum storage duration: 2 Years | Type: Functional Cookies

Statistical cookies help us understand how visitors interact with the site, measure traffic, and improve services. Data is processed in aggregated or pseudonymized form by providers such as Google and Yandex.

  • Statistical Cookies

    _ga, _ga_*

    Google Analytics cookies used to distinguish users and sessions for traffic measurement and site usage analysis.


    Maximum storage duration: 2 Years | Type: Statistical Cookies
    _gid

    Google Analytics cookie used to distinguish users within a single day session.

    Maximum storage duration: 24 Hours | Type: Statistical Cookies
    _ym_uid

    Yandex Metrica unique visitor identifier used to distinguish users across sessions.

    Maximum storage duration: 1 Year | Type: Statistical Cookies
    _ym_d

    Yandex Metrica cookie that stores the date of the user's first visit.

    Maximum storage duration: 1 Year | Type: Statistical Cookies
    _ym_isad

    Yandex Metrica cookie used to detect whether the user has an ad blocker enabled.

    Maximum storage duration: 2 Days | Type: Statistical Cookies
    _ym_visorc

    Yandex Metrica Webvisor cookie used to record and replay user sessions for usability analysis.

    Maximum storage duration: 30 Minutes | Type: Statistical Cookies

Marketing cookies are used for advertising, campaign attribution, conversion tracking, personalization, and cross-platform measurement by providers such as Google, Microsoft, Meta, and TikTok.

  • Marketing Cookies

    AID

    Used by Google to link activity across devices and improve ad attribution.


    Maximum storage duration: 1 Year | Type: Marketing Cookies
    ANONCHK

    Used by Microsoft Advertising to validate and support ad-related requests.

    Maximum storage duration: 10 Minutes | Type: Marketing Cookies
    MUID

    Microsoft advertising identifier used to recognize browsers across Microsoft domains.

    Maximum storage duration: 13 Months | Type: Marketing Cookies
    __Secure-3PSID, __Secure-3PAPISID, __Secure-3PSIDTS, __Secure-3PSIDCC

    Google advertising and personalization cookies used to build preference profiles and support ad delivery.

    Maximum storage duration: 2 Years | Type: Marketing Cookies
    ADS_VISITOR_ID

    Used by Google to identify visitors for advertising and attribution purposes.

    Maximum storage duration: 2 Years | Type: Marketing Cookies
    OTZ

    Used by Google to support ad personalization and service optimization.

    Maximum storage duration: 1 Month | Type: Marketing Cookies
    __Secure-1PAPISID, __Secure-1PSID

    Google cookies used to support more relevant ads and account-related ad security.

    Maximum storage duration: 2 Years | Type: Marketing Cookies
    IDE, DSID, FLC

    DoubleClick / Google Ads cookies used for campaign attribution, ad delivery, and remarketing.

    Maximum storage duration: Varies by cookie | Type: Marketing Cookies
    datr, fr, sb, xs

    Meta / Facebook cookies used for browser recognition, security, ad measurement, and personalization across Meta services and partner sites.

    Maximum storage duration: Varies by cookie | Type: Marketing Cookies
    ttcsid

    TikTok identifier used for session-level event attribution, conversion tracking, and advertising measurement.

    Maximum storage duration: Varies by configuration | Type: Marketing Cookies
    ttcsid_D5GFV53C77U3VC0C2T50

    TikTok pixel-specific session cookie used for conversion attribution and advertising performance reporting.

    Maximum storage duration: Varies by configuration | Type: Marketing Cookies
    odin_tt

    TikTok cookie used for campaign attribution, browser recognition, and advertising performance measurement.

    Maximum storage duration: Varies by cookie | Type: Marketing Cookies
    tt_chain_token

    TikTok cookie used for event attribution and campaign linkage across sessions.

    Maximum storage duration: Varies by cookie | Type: Marketing Cookies
    ttwid

    TikTok browser identifier used for attribution, advertising measurement, and remarketing support.

    Maximum storage duration: Varies by cookie | Type: Marketing Cookies
    NID, UULE

    Google cookies that may support ad personalization, localization, and service preference handling depending on the integration and browser state.

    Maximum storage duration: Varies by cookie | Type: Marketing Cookies
    SEARCH_SAMESITE

    Google cookie used to support secure cookie handling across requests and service interactions.

    Maximum storage duration: 6 Months | Type: Marketing Cookies
About cookies and consent

This website uses cookies and similar technologies to ensure its proper functioning and, with your consent, to support functionality, measure usage, improve performance, and provide advertising, attribution, or personalized content. The legal basis for the use of necessary cookies is the legitimate interest of the data controller (Art. 6(1)(f) GDPR), while functional, statistical, and marketing cookies are used only upon your explicit consent (Art. 6(1)(a) GDPR).

Cookies are small text files stored on your device to make the website work efficiently and improve your experience. Some cookies are placed directly by us, while others may be set by third-party services integrated into our pages.

Cookie categories
  • Necessary cookies: enable core site functionality such as consent storage, language selection, authentication, and access to secure areas. These cannot be disabled.
  • Functional cookies: allow the website to remember settings and support integrations such as embedded or third-party services.
  • Statistical cookies: collect usage and performance data to help understand and improve the site.
  • Marketing cookies: support advertising, campaign attribution, personalization, and remarketing across providers and services.
Storage and consent management

Your cookie preferences are stored locally in a cookie named consent, valid for 12 months, and pseudonymously on our systems using a technical identifier (UserUUID), which does not allow direct identification of the user. You may change or withdraw your consent at any time via the cookie settings button visible at the bottom left of the site.

Third-party cookies

Some cookies are provided by third-party services such as Google, Microsoft, Meta, TikTok, and Yandex. These third parties may act as independent controllers for the data collected through their own technologies and services.

Your rights

You can withdraw or modify your consent at any time, delete cookies through your browser settings, and exercise your rights under Articles 15–22 GDPR (access, rectification, deletion, limitation, opposition, portability) by contacting us via the details provided in the Privacy Policy.

This Cookie Policy is aligned with Regulation (EU) 2016/679 (GDPR) and the ePrivacy Directive.