Scalpel
FeaturesCockpitPricingGuidesBlogSign inDownload
All guides
1.Getting started
  • Install Scalpel on Windows
  • Install Scalpel on a Mac
  • Activate your Scalpel licence
  • Connect Scalpel to Interactive Brokers
  • Enable the API in TWS and IB Gateway
  • The IBKR market data you need for Level 2
  • Your first 15 minutes in SIM
  • A tour of the Scalpel cockpit
  • What Scalpel is for, and what it is not
2.Desks and layout
  • Load symbols onto desks
  • Add, remove and resize desks
  • Panel settings: Level 2, tape and chart
  • Set up Scalpel for one, two or three screens
  • Desk badges: DELAYED, NO DATA, STALE and HALTED
3.Reading the market
  • How to read Level 2 in Scalpel
  • Spot iceberg orders on Level 2
  • Read the time and sales tape
  • Hear the tape: tape sound
  • The chart: timeframes, VWAP, EMAs, MACD and delta
  • The read line and the chart read bar
  • Read the players on Level 2: venues, refills and size
4.Placing trades
  • Sizing presets: shares, dollars or risk
  • Trade a fixed dollar risk with Risk (Cents)
  • Hotkeys: the defaults and how to change them
  • Entries: marketable limits, offsets and partial fills
  • Scale out and flatten
  • The order bar and orders panel
5.Stops and targets
  • How Scalpel's stops work
  • Move your stop and target on the chart
  • Breakeven and trailing stops
  • R multiples: how Scalpel measures a trade
  • Stops in the pre-market: why they cannot sit on the book
6.SIM and LIVE
  • Paper trading with SIM
  • Switch to LIVE safely
  • Commissions: pick your IBKR plan
  • Analytics: review your trading
7.Risk controls
  • Set a daily loss limit (the kill-switch)
  • Fat-finger and max-position caps
  • Why Scalpel is long-only
8.Scanner
  • Set up the IBKR scanner
  • Scan types: momentum, running up and setups
  • Scan the pre-market
  • Shares out, short interest and the squeeze score
  • Arrange scan panels
9.Intel: borrow, dilution and catalysts
  • Turn on intel
  • Check a stock for dilution before you buy
  • Borrow, short fees and squeeze setups
  • Why is it moving? Catalyst grading
  • Every intel chip, explained
  • Warrant and offering lines on the chart
  • The dilution entry guard
10.Audio and alerts
  • Voice callouts and sounds
  • Alerts and toasts
11.Settings reference
  • Settings: Connection
  • Settings: Trading
  • Settings: Stops
  • Settings: Risk
  • Settings: Sizing
  • Settings: Appearance
  • Settings: Audio
  • Settings: Hotkeys
  • Settings: Intel
  • Settings: About
12.Licence, updates and account
  • Move your licence to a new computer
  • Updates: how Scalpel updates itself
  • Try new features early: the beta channel
  • Refunds, invoices and billing
  • Earn with the referral program
  • Get help on Discord
13.Troubleshooting
  • Scalpel says Disconnected: fix the IBKR connection
  • TWS is running but not accepting the connection
  • TWS signs out when IB Gateway starts
  • Delayed data, NO DATA or STALE, or Depth unavailable
  • A LIVE order was rejected
  • An order did not fill, or only part filled
  • Scan panels say the IBKR scanner is off or waiting
  • Licence: machine limit reached
  • Licence: Scalpel cannot reach scalpeltrade.com
  • Windows protected your PC: installing Scalpel
  • An update did not install, or Scalpel went back a version
  • The chart or app window is blank
  • The order bar is greyed out
  • No callouts or tape sound
  • Intel shows nothing or SEC filings are off
14.Tips and tricks
  • 40 Scalpel tips for faster, safer scalping
  • A pre-market routine with Scalpel
  • Trade without touching the mouse
  • Settings for a small account
  • Your first week: a SIM practice plan
  • The momentum method Scalpel is built around
15.Glossary
  • Day trading glossary
Scalpelscalpeltrade.comA keyboard-first scalping cockpit for Interactive Brokers.
ProductFeaturesCockpitPricingDownloadFAQ
ResourcesGuidesTroubleshootingGlossaryBlogCompareChangelogAccountRefer a trader
CommunityDiscordYouTube
CompanyAboutFor AI agentsContactTermsPrivacyRefundsRisk

Trading involves substantial risk of loss. Scalpel is software, not investment advice. LIVE mode places real orders in your Interactive Brokers account. No warranty. Simulated or replayed results do not guarantee future results. Scalpel is independent software and is not affiliated with, endorsed by or sponsored by Interactive Brokers LLC. IBKR and TWS are trademarks of their respective owners. Figures shown on this site are demo data, not live quotes. Scalpel is sold by QUITE RIGHT LIMITED, registered in England and Wales, company number 17053815. Copyright 2026.

    All guides
    1.Getting started
    • Install Scalpel on Windows
    • Install Scalpel on a Mac
    • Activate your Scalpel licence
    • Connect Scalpel to Interactive Brokers
    • Enable the API in TWS and IB Gateway
    • The IBKR market data you need for Level 2
    • Your first 15 minutes in SIM
    • A tour of the Scalpel cockpit
    • What Scalpel is for, and what it is not
    2.Desks and layout
    • Load symbols onto desks
    • Add, remove and resize desks
    • Panel settings: Level 2, tape and chart
    • Set up Scalpel for one, two or three screens
    • Desk badges: DELAYED, NO DATA, STALE and HALTED
    3.Reading the market
    • How to read Level 2 in Scalpel
    • Spot iceberg orders on Level 2
    • Read the time and sales tape
    • Hear the tape: tape sound
    • The chart: timeframes, VWAP, EMAs, MACD and delta
    • The read line and the chart read bar
    • Read the players on Level 2: venues, refills and size
    4.Placing trades
    • Sizing presets: shares, dollars or risk
    • Trade a fixed dollar risk with Risk (Cents)
    • Hotkeys: the defaults and how to change them
    • Entries: marketable limits, offsets and partial fills
    • Scale out and flatten
    • The order bar and orders panel
    5.Stops and targets
    • How Scalpel's stops work
    • Move your stop and target on the chart
    • Breakeven and trailing stops
    • R multiples: how Scalpel measures a trade
    • Stops in the pre-market: why they cannot sit on the book
    6.SIM and LIVE
    • Paper trading with SIM
    • Switch to LIVE safely
    • Commissions: pick your IBKR plan
    • Analytics: review your trading
    7.Risk controls
    • Set a daily loss limit (the kill-switch)
    • Fat-finger and max-position caps
    • Why Scalpel is long-only
    8.Scanner
    • Set up the IBKR scanner
    • Scan types: momentum, running up and setups
    • Scan the pre-market
    • Shares out, short interest and the squeeze score
    • Arrange scan panels
    9.Intel: borrow, dilution and catalysts
    • Turn on intel
    • Check a stock for dilution before you buy
    • Borrow, short fees and squeeze setups
    • Why is it moving? Catalyst grading
    • Every intel chip, explained
    • Warrant and offering lines on the chart
    • The dilution entry guard
    10.Audio and alerts
    • Voice callouts and sounds
    • Alerts and toasts
    11.Settings reference
    • Settings: Connection
    • Settings: Trading
    • Settings: Stops
    • Settings: Risk
    • Settings: Sizing
    • Settings: Appearance
    • Settings: Audio
    • Settings: Hotkeys
    • Settings: Intel
    • Settings: About
    12.Licence, updates and account
    • Move your licence to a new computer
    • Updates: how Scalpel updates itself
    • Try new features early: the beta channel
    • Refunds, invoices and billing
    • Earn with the referral program
    • Get help on Discord
    13.Troubleshooting
    • Scalpel says Disconnected: fix the IBKR connection
    • TWS is running but not accepting the connection
    • TWS signs out when IB Gateway starts
    • Delayed data, NO DATA or STALE, or Depth unavailable
    • A LIVE order was rejected
    • An order did not fill, or only part filled
    • Scan panels say the IBKR scanner is off or waiting
    • Licence: machine limit reached
    • Licence: Scalpel cannot reach scalpeltrade.com
    • Windows protected your PC: installing Scalpel
    • An update did not install, or Scalpel went back a version
    • The chart or app window is blank
    • The order bar is greyed out
    • No callouts or tape sound
    • Intel shows nothing or SEC filings are off
    14.Tips and tricks
    • 40 Scalpel tips for faster, safer scalping
    • A pre-market routine with Scalpel
    • Trade without touching the mouse
    • Settings for a small account
    • Your first week: a SIM practice plan
    • The momentum method Scalpel is built around
    15.Glossary
    • Day trading glossary
    Guides/1. Getting started

    Guide 1.5

    Enable the API in TWS and IB Gateway

    Beginner, 5 min read. Checked with Scalpel 1.12.8 on October 15, 2026.

    In short

    In TWS, open the global configuration, go to API > Settings, tick Enable ActiveX and Socket Clients, untick Read-Only API, keep Allow connections from localhost only ticked and note the Socket port. In IB Gateway the same page is under Configure > Settings > API > Settings, with the socket always on. Then set the same port in Scalpel's Settings > Connection > Port (7497 by default for TWS, 4001 for IB Gateway) and click Apply.

    TWS and IB Gateway ship with the API closed or read-only, so a fresh install will not talk to Scalpel until you change three or four settings. You do this once; both programs remember it.

    Before you start

    • TWS or IB Gateway installed and logged in (guide 1.4 helps you choose).
    • Scalpel installed and activated (guide 1.3).

    Turn the API on in TWS

    1. 01

      Open the API settings

      In TWS, open File > Global Configuration (in the Classic layout, Edit > Global Configuration). In the tree on the left, expand API and click Settings. Scalpel's connection banner calls this page Configure > API > Settings.

      Global Configuration
      ConfigurationAPISettingsPrecautionsLock and Exit
      Enable ActiveX and Socket ClientsRead-Only APISocket port7497Master API client IDAllow connections from localhost onlyTrusted IPs127.0.0.1OKApplyCancel
      12345
      Simplified. TWS, API settings: Enable ActiveX and Socket Clients 1, Read-Only API off 2, the socket port 3, localhost only 4 and Trusted IPs 5.
    2. 02

      Tick Enable ActiveX and Socket Clients

      This opens the socket Scalpel connects to 1. Without it, nothing answers on the port and Scalpel's banner says neither TWS nor IB Gateway is running.

    3. 03

      Untick Read-Only API

      With Read-Only API ticked 2, Scalpel can read data and your account but every LIVE order is refused. SIM works either way, because SIM orders never reach IBKR. Untick it before you trade LIVE; leave it ticked while you only practise if you prefer the extra lock.

    4. 04

      Check the socket port

      Socket port 3 is the number Scalpel must use. TWS suggests 7496 after a live login and 7497 after a paper one. Either set it to 7497 (Scalpel's default) or leave it and set Scalpel to match in the last step.

    5. 05

      Keep localhost only

      Leave Allow connections from localhost only ticked 4. Scalpel runs on the same computer and connects from 127.0.0.1, which this always allows, and nothing else on your network can reach your account. If you ever untick it, add 127.0.0.1 to Trusted IPs 5 with Create, or TWS asks you to accept every connection.

      Leave Master API client ID empty.

    6. 06

      Click Apply, then OK

      TWS applies the settings at once; no restart needed.

    Turn the API on in IB Gateway

    IB Gateway always has its socket open, so there is no Enable ActiveX checkbox. The rest is the same:

    1. In IB Gateway's window, open Configure > Settings, then API > Settings in the tree.
    2. Untick Read-Only API (it starts ticked) if you will trade LIVE.
    3. Note the Socket port: 4001 after a live login, 4002 after a paper one.
    4. Keep Allow connections from localhost only ticked.
    5. Click Apply, then OK.
    Configuration
    ConfigurationAPISettingsPrecautionsLock and Exit
    Read-Only APISocket port4001Master API client IDAllow connections from localhost onlyTrusted IPs127.0.0.1OKApplyCancel
    Simplified. IB Gateway, API settings: the same page without the Enable ActiveX checkbox. Live logins listen on 4001.

    Set the same port in Scalpel

    Open Settings (Ctrl+,) > Connection. Set Port to the socket port you noted: 7497 or 7496 for TWS, 4001 or 4002 for IB Gateway. Keep Host at 127.0.0.1. Click Apply; Scalpel reconnects at once, and the IBKR pill in the status bar turns green.

    Settings
    ConnectionTradingStopsRiskSizingAppearanceAudioHotkeysIntelAbout
    IBKR TWS (stocks: market data + orders)Enabled
    Host127.0.0.1Port7496
    Scalpel starts on 7497 for TWS and 4001 for IB Gateway. Host/port changes reconnect on Apply (no restart). Disabling parks the connection so it stops retrying when nothing is running. While the link is down, a banner under the header says which program is up (TWS on 7497 or 7496, IB Gateway on 4001 or 4002) and offers to switch to it or start one.
    IBKR scanner (market scans over TWS)Enabled
    CancelApply
    Settings, Connection, set for a live TWS login on 7496. Host stays 127.0.0.1.
    Tip

    You do not have to get the port right first time. While the link is down, Scalpel looks for TWS on 7497 and 7496 and IB Gateway on 4001 and 4002, and the banner under the header offers Use port 7496 or Use IB Gateway when it finds one (guide 1.4).

    Settings worth changing while you are there

    These are optional, but traders who skip them meet the problems later:

    Setting (TWS or IB Gateway)Change it toWhy
    Lock and Exit: auto restartOn, at a time you never tradeBoth programs log out daily otherwise, and Scalpel loses its connection until you log back in
    API > PrecautionsReview the order precautionsTWS can hold back API orders with its own size and price warnings. Scalpel has its own caps (guide 7.2)
    Other API toolsDo not reuse Scalpel's client IDsScalpel opens several API connections with client IDs 1, 2, 10 and 70 to 72 (100 and up with data recording on). Another tool on the same ID knocks one of them off

    What can go wrong

    • "Not accepting the connection" in Scalpel's banner. The port is open but the API handshake fails: TWS is showing a window asking whether to accept the connection, or Allow connections from localhost only is off and 127.0.0.1 is not in Trusted IPs. See guide 13.2.
    • "Neither TWS nor IB Gateway is running" although TWS is open. Enable ActiveX and Socket Clients is off, so TWS is not listening at all, or its socket port is not one of the standard four. See guide 13.1.
    • LIVE orders are rejected, SIM works. Read-Only API is still ticked. See guide 13.5.
    • It worked yesterday. TWS logged out overnight. Log in again, and set auto restart under Lock and Exit (guide 13.1).

    Questions

    Where is Enable ActiveX and Socket Clients in TWS?
    In the global configuration (File, Global Configuration, or Edit, Global Configuration in the Classic layout), under API, Settings. It is the first checkbox. IB Gateway has no such box: its socket is always on.
    What is the difference between TWS ports 7496 and 7497?
    TWS suggests 7496 after a live login and 7497 after a paper login. Either works with Scalpel, as long as Settings, Connection, Port in Scalpel is the same number.
    What port does IB Gateway use?
    4001 after a live login and 4002 after a paper login, unless you change it in Configure, Settings, API, Settings.
    Do I need to add 127.0.0.1 to Trusted IPs?
    Not while Allow connections from localhost only is ticked: local connections are allowed already. Add 127.0.0.1 only if you untick that box.
    Is it safe to turn off Read-Only API?
    It lets programs on this computer place orders, which Scalpel needs for LIVE trading. Keep Allow connections from localhost only ticked so nothing on your network can. While you only use SIM, you can leave read-only on.

    Related guides

    Guide 1.4Connect Scalpel to Interactive BrokersRun TWS or IB Gateway, match the API port and watch Scalpel connect. Which program to use, the ports (7497, 7496, 4001) and what the link banner tells you.Guide 13.2TWS is running but not accepting the connectionThe banner says TWS or IB Gateway is running but not accepting the connection: enable the API socket, allow Scalpel or trust 127.0.0.1, and reconnect.Guide 13.1Scalpel says Disconnected: fix the IBKR connectionScalpel cannot reach TWS or IB Gateway? Check the program is running and logged in, the API is on and the port matches, and use the banner's fix.
    Previous: 1.4Connect Scalpel to Interactive BrokersNext: 1.6 The IBKR market data you need for Level 2
    Practice in SIM, against the live book.A lifetime license, every update included, with a 7-day refund guarantee.Ask in DiscordGet Scalpel
    Sign in