2.17

🌉 IBKR Live Bridge

Realtids-Greeks, IV och bid/ask i straderz.com

1. Vad är IBKR Live Bridge?

Med IBKR Live Bridge ser du dina öppna optioner och portföljdata med realtids-Greeks, Implied Volatility, Bid/Ask och P&L direkt i straderz.com — som komplement till den dagliga Flex Query-synkroniseringen.

Vad du ser i Live Cockpit:
  • Live Greeks (Δ, Γ, Θ, V) för varje öppen optionsposition
  • Implied Volatility och Bid/Ask i realtid
  • Portfölj-Δ och Θ aggregerat över alla positioner — omedelbart synligt när boken blir för lång eller för kort
  • Kontosaldo och margin live
  • Optionskedjor på begäran för what-if-analys
Kompletterar — ersätter inte.
Bridge körs parallellt med den nattliga Flex Query-synkroniseringen. Flex förblir källan till sanning för den officiella handelshistoriken (skatter, strategiigenkänning, kampanjer). Bridge tillhandahåller realtidsvägen för aktiv optionsförvaltning.
✨

Hur det fungerar

Live Bridge är en liten lokal app på din PC som kommunicerar med din körande TWS eller IB Gateway via IBKR API och skickar krypterade ögonblicksbilder till straderz.com. Din IBKR-inloggning stannar helt och hållet på din maskin — vi tar emot varken ditt lösenord eller dina 2FA-koder.

[Din PC]                                       [straderz.com]                                  [Du i webbläsaren]
TWS / IB Gateway
    ↓ ib_insync TCP
[Live Bridge] ──── HTTPS POST ────►  [Server] ◄──── HTTPS GET ──── [Live Cockpit]
    │                                    │
    └─ läser positioner,                  └─ lagrar ögonblicksbilder,
       Greeks, IV, Bid/Ask                   levererar dem till din webbläsare
Dataflöde i korthet:
  • Skrivskyddad, ingen handel — Bridge lägger inga order. Den skickar bara positioner, Greeks, IV, Bid/Ask, kontosaldo.
  • Isolerad per användare — varje ögonblicksbild är bunden till ditt konto via OAuth-token; andra användare ser den aldrig.
  • Latens ~2 sekunder från IBKR-ticken till visning i cockpit.
  • HTTPS-push med bearer token, ETag-baserad webbläsarpolling för minimal databelastning.

3. Krav

  • Windows 10 eller 11 — Mac under förberedelse (se not nedan)
  • IBKR-konto med körande TWS (Trader Workstation) eller IB Gateway
  • IBKR API aktiverat — i TWS under Configuration → API → Settings, aktivera "Enable ActiveX and Socket Clients"
  • sTraderZ.com-konto (gratis eller Premium)
  • Valfritt: IBKR market data-prenumeration för live-data — se "Market data-prenumeration & försenade kurser"
⏳ Mac-version
Bridge körs för närvarande bara på Windows. En Mac-version är under förberedelse — tills dess fortsätter Mac-användare att använda Flex Query-synkroniseringen som sin primära dataväg.

Steg-för-steg-guide

1

Installation

1. Ladda ner Bridge:
Ladda ner Bridge från nedladdningssidan eller direkt från Live Bridge-inställningarna.

2. Starta Bridge:
Dubbelklicka på straderz-bridge.exe. Inget fönster öppnas — Bridge körs i bakgrunden. Bridge-ikonen visas i systemfältet (nere till höger bredvid klockan).

3. Kör TWS eller IB Gateway parallellt:
Starta din vanliga IBKR-programvara och logga in. Bridge identifierar automatiskt den körande gatewayen och ansluter till den.
2

Para ihop med straderz.com

1. Starta ihopparning i straderz.com:
Gå till Konton → Live Bridge och klicka på "Anslut till straderz.com".

2. Webbläsarens auktoriseringsdialogruta:
En bekräftelsesida öppnas med ditt kontonamn. Klicka på "Anslut" — OAuth-flödet körs med PKCE, så Bridge ser aldrig ditt lösenord.

3. Kontrollera fältstatus:
Klicka på Bridge-ikonen i systemfältet. Status ska visa ✅ ansluten.

4. Första data i cockpit:
Byt till Live Cockpit. Inom några sekunder visas dina öppna positioner med live Greeks och IV.

6. Multi-konto: Privat, Företag, Stiftelse parallellt

Om du kör flera IBKR-konton — t.ex. privatkonto + företagsdepå + stiftelsevehickel — kan du ta med dem alla till cockpit live samtidigt.

Inställning:
Starta flera IB Gateway-instanser parallellt, var och en på sin egen port (t.ex. :7497 för privat, :7498 för företag, :7499 för stiftelse). Bridge identifierar automatiskt alla gateways och taggar varje position med sitt motsvarande konto.

I cockpit kan du sedan växla mellan konton eller visa en samlad vy över alla konton.

💡 Tips: Den officiella IBKR-dokumentationen beskriver den parallella gateway-inställningen under "IB Gateway User Guide → Running Multiple Instances". Använd en separat IBKR-inloggning (underkonto) för varje instans.
✨

Market data-prenumeration & försenade kurser

Bridge använder din befintliga IBKR market data-prenumeration — ingen andra prenumeration på straderz.com krävs. Om du betalar för "US Securities Snapshot and Futures Value Bundle" eller liknande hos IBKR, flödar den live-datan automatiskt in i cockpit.

Utan IBKR-prenumeration: Bridge levererar bara 15 minuters försenade kurser. Viktigt att veta: detta gäller även din TWS-display. Utan en prenumeration levererar IBKR i grunden bara försenade kurser, oavsett frontend (TWS, Bridge, mobilapp, andra tradingappar). Bridge ändrar inte detta.

Med IBKR-prenumeration: Live-data i TWS OCH straderz.com samtidigt. Du ser samma realtidsvärden som du har i TWS.

Rekommendation för aktiv optionshandel:
Minst "US Securities Snapshot and Futures Value Bundle" eller ett specifikt optionsdatapaket. Detaljer och aktuella priser i IBKR Client Portal under Settings → User Settings → Market Data Subscriptions.

8. Drift

  • Kör Bridge i bakgrunden — ikon i systemfältet, låg RAM-användning, inget användargränssnitt behövs.
  • Automatiska uppdateringar — Bridge kontrollerar om det finns nya versioner vid start. Om en uppdatering finns tillgänglig visas ett meddelande i systemfältsmenyn.
  • Stoppa Bridge — högerklicka på ikonen i systemfältet → "Avsluta". Cockpit visar sedan det senast kända tillståndet med markören "inaktuell".
  • Återkalla anslutning — i Konton → Live Bridge, klicka på "Koppla bort". Token återkallas omedelbart på serversidan och kan inte längre användas för ögonblicksbilder.
  • 2FA-notering (viktigt): Aktivera IBKR "Extended Session", annars måste du logga in på TWS igen var ~24:e timme — och Bridge körs utan aktiv anslutning under tiden. Instruktioner i IBKR Account Management under Settings → Account Settings → Secure Login System.

⚠️ Felsökning

Systemfältet visar "Offline" eller "Ingen anslutning":
TWS eller IB Gateway körs inte, eller API-socketen är inte aktiverad. Kontrollera kraven från avsnitt 3.

"Ihopparning misslyckades":
Token återkallades eller har gått ut. Lösning: i Live Bridge-inställningarna, klicka på "Anslut till straderz.com" och para ihop igen.

Cockpit visar bara försenade kurser:
Ingen IBKR market data-prenumeration (se "Market data-prenumeration & försenade kurser"). Med en prenumeration skickas live-data automatiskt igenom.

"Uppdateringar kommer inte igenom":
Kontrollera Bridge-statusen i systemfältet. Om "ansluten" visas men inga uppdateringar kommer: starta om TWS eller IB Gateway — TCP-anslutningen kan hänga sig på grund av nätverksändringar (t.ex. WiFi/LAN).

Bridge kraschar eller hänger sig:
Avsluta Bridge i systemfältet, starta om den. Vid upprepade krascher: är den senaste versionen installerad? Ladda ner den senaste versionen från nedladdningssidan.

Inget IBKR-konto konfigurerat än?
Live Bridge kräver att du redan har anslutit IBKR-kontot via Flex Query (för handelshistoriken). → Kapitel 2.1 — Konfigurera IBKR Flex Query

10. TWS or IB Gateway?

The sTraderZ Bridge connects to either TWS (Trader Workstation) or IB Gateway. You need only one of the two; both give the sTraderZ Bridge the same data. IB Gateway is a separate program from Interactive Brokers: a pure interface without a trading screen, just a login and status window.

TWSIB Gateway
PurposeTrading platform with charts, order book and watchlists. Useful if you trade by hand there anyway.No trading screen; orders are possible only through programs via the API. Useful if the sTraderZ Bridge should read data and you do not trade in the program yourself.
ResourcesHeavy, needs a lot of memory and CPULight, runs quietly in the background
Always-on useLogs out regularly, then needs a new loginBuilt for always-on use, with automatic restart
API port7497 paper, 7496 live4002 paper, 4001 live
Enable the APIEdit → Global Configuration → API → SettingsConfigure → Settings → API → Settings
Downloadinteractivebrokers.comStable (recommended) or Latest
The port is not a firewall question.
If the sTraderZ Bridge reports "connection refused", nothing is listening on the port (e.g. 4001) because the API is still switched off in the program. You do not need to open anything in firewall or router as long as TWS or Gateway and the sTraderZ Bridge run on the same computer. Enable the API (menu path in the table), then click Apply and OK.

11. The "Date" column in the Live Cockpit

Next to the market data, the Live Cockpit shows in the Date column which earnings and dividend dates fall on a row within the next 14 days. The data comes from a separate, slower request (every 60 seconds) and does not disturb the price updates. If the source fails, the cockpit stays unchanged and the column shows a question mark.

  • E 19.11. – earnings. For options only a date before expiry counts. ~E means the date is not confirmed yet.
  • Ex 12.11. – ex-dividend day. For options only for positions with a call leg and only if the ex-date is not after expiry (early exercise possible).
  • +1 – there are more dates; the mouseover shows all of them.

The chip colour shows how close the date is to a position it affects: red for sold options in or near the money, yellow for other sold options, grey as plain information (e.g. stocks or bought options). There is deliberately no green: "no date" does not mean "checked and fine". The chips are orientation, not a recommendation to act.

On a phone the next date appears as a hint after the position name; the tooltip opens on tap. The column can be shown or hidden in the column selector.

More context elements. The Rule column shows whether one of your action rules has triggered for the position (symbol of the highest level, with a count from two rules). The Campaign column (off by default, switch it on in the column selector) shows the type and roll count of the matching campaign; it stays empty if the assignment is not unambiguous. The 👁️ button at the end of a row opens a detail panel with rules, dates and the campaign history; the live values keep updating inside it. The Risk tab starts with a scenario (a rough approximation from delta and gamma for an index move of −10%, −5%, +5% or +10%, with beta 1 for all underlyings, without volatility change or time decay; not a forecast) and then lists concentration (capital tied up per factor, across all web accounts), the dates of the next 14 days and rules without a row. The Campaigns tab shows open campaigns with realized (journal), open (live), fees and risk, separated by currency. Rules, concentration and campaigns are calculated on journal holdings while the table shows live data, so a trade opened just now may be missing briefly. Accounts in vault mode are not evaluated on the web.

12. Search roll options (roll search in the Live Cockpit)

For sold options the Live Cockpit shows the Roll chip. A click opens the detail panel and starts Search roll options: the bridge asks TWS for later expiries and strikes further out of the money and checks whether closing the old and opening the new position still gives a net credit (or at most the debit you set). The search places no orders and gives no recommendation.

What is checked. For each expiry (about 7, 14, 21, 28, 56 and 84 days after the current expiry, at most 100 days) the search starts at the current strike and moves strike by strike away from the money (puts down, calls up), at most 16 strikes per expiry. For spreads both legs keep their width and move the same amount; the outer wing must exist. For a covered call only the call leg is rolled.

Can be rolledCannot be rolled
Short put, short call, bull put spread, bear call spread, covered call (call leg)Long options, debit spreads, straddles, strangles, iron condors

Reading the matrix. Rows are strikes, columns are expiries (with days to expiry); the cells show the credit per share (for spreads per spread). Green is a credit, red a debit, a dot means "not queried" because the search had already stopped earlier in that expiry or the strike does not exist there. The strongly tinted cell is the furthest strike per expiry that still stays within the limit: a credit, or with a max debit above 0 also a debit up to that amount. If "…" appears below the last cell of an expiry, the search was cut off there before the end (time ran out or the bridge had another request); a note below the matrix names these expiries. A line below a strike marks the current price; the bar on the left marks the current strike. Above the matrix you see the buy-back cost (at the ask for short options) with quantity, the time of the snapshot and the price.

A click on a cell shows the detail line below: expiry and strike (with "+n d longer"), credit per share, total (credit × quantity × multiplier), the position delta after rolling and the OTM distance to the price in percent. Two buttons: Copy both legs puts the data of both legs on the clipboard, Open in the chain jumps to the option chain.

Bid/Ask or Mid. The switch selects the price basis. Bid/Ask uses the unfavourable price per leg (buy back at the ask, sell the new one at the bid); Mid uses the midpoint. The display stops at the first debit of the chosen basis. The Max debit field lets cells with a debit up to that amount per share still count as a hit (default 0.00).

Limits. The result is a snapshot with a time, not live; fees are not included. Outside market hours or without a market data subscription the search reports "no quote" or delayed quotes, and the numbers are uncertain. A second search right after the first is throttled. The roll search needs Bridge 1.4.0; with an older bridge a hint asks you to update it. The search quotes the contracts of the main trading class of the underlying. For adjusted options (for example after a corporate action, symbols like 1XYZ) or for SPX, where monthly options (SPX) and weekly options (SPXW) expire on the same day, the quotes can belong to a different contract than your position: check the result against the position in TWS. It is a calculation aid, not investment advice.

13. Prices of all accounts through one account (several IBKR accounts, one market data subscription)

If you connect several IBKR accounts to the sTraderZ Bridge over separate connections but only one of them has a market data subscription, the other accounts show delayed or no prices. A price belongs to the contract, not to the account. With the option Prices of all accounts through one account the bridge additionally fetches the prices of the positions of all accounts through the connection of the account with the subscription. If all accounts run under one IBKR login (linked accounts), you usually do not need the option: the bridge then says "All accounts run over one connection, so the option is not needed".

Switching it on. In the bridge, open the Accounts tab and click Prices of all accounts through one account .... The dialog lists all accounts with their current market data state and lets you choose the account with the subscription as the source. "Switch on" stays locked until you tick the mandatory box: All listed accounts belong to me, and my market data subscription may be used for them. You switch it off with one click in the same tab. The option is off by default. The switch exists only in the bridge, not on the web.

Licence. An IBKR market data subscription applies per person. It must not be used for accounts of other persons. With the box you confirm that all listed accounts belong to you and that your subscription may be used for them; the bridge cannot check this. This is not legal advice: the terms of IBKR apply.

What is shared and what is not.

Comes through the sourceStays per account
Bid/ask, price, Greeks, implied volatility, underlying prices, option chain and roll searchMargin, net liquidation value, cash, orders, holdings, daily P&L. The daily P&L can stay empty for accounts without their own subscription.

The better state wins per position. The bridge compares the account own price with the price of the source and takes the better one, ranked live, last price only, delayed, no price. On a tie the account keeps its own price. In the Live Cockpit the tooltip of the market data dot then reads "Price via account X". The same rule applies to underlying prices, per underlying: the price of the source replaces the account own price if it is better or the account has none, otherwise the account keeps its own.

Unrealized P&L. If the price of a position comes from the source, the bridge calculates the unrealized profit or loss itself: (price × multiplier − cost basis) × quantity. The price is the midpoint of bid and ask, otherwise the last price. This can differ from the TWS display by a few cents. If the calculated price differs strongly from the price IBKR reports itself (below half or above double), the IBKR value stays. On a tie of the states, bid/ask stay with the account itself; if IBKR has no price for the position, the price for the P&L still comes from the source. Worked examples are in the calculation sheet for the feature.

If the source drops out. If the connection of the source is lost, all accounts fall back to their own prices within one cycle, without an error message. When the source returns, the option applies again. Option chain and roll search run through the source while the option is active and the source is connected; while the option rests or the source is disconnected, they use the first connected account.

New account or different source. The confirmation only covers the accounts the dialog showed when you switched it on. If you connect another account later, the bridge reports it as a hint; the account keeps its own prices until you confirm the option again in the dialog. A change of the source, or a source that reports different account numbers, also needs a new confirmation.

Display on the bridge page. On the Live Bridge settings page a read-only status card shows whether the option is on or off, which source applies, when it was confirmed and for which accounts. The time is shown in server time. If more than one bridge is running, the card shows the state of the bridge that reported last. The state appears only after the bridge is updated to the current version.

Limits. The positions of all accounts share the data lines of the source (by default 100 per login at IBKR). Option chain and roll search take additional lines on the source and compete with the shared positions. The bridge interface is available in German only so far. The self-calculated P&L is a calculation aid, not investment advice.

14. Optionsanalyse im Live-Cockpit (GEX, Flip, Skew)

Der Reiter Optionsanalyse im Live-Cockpit rechnet aus der Optionskette eines Basiswerts Kennzahlen und Diagramme. Er braucht die Bridge, weil die Kette über sie aus deiner TWS kommt. Gib den Basiswert ein oder wähle ihn unter Meine Positionen. Die Rechnung läuft in deinem Browser, deine Kurse bleiben bei dir.

Was die Kennzahlen bedeuten

  • Net GEX (Gamma Exposure): Gamma mal Open Interest mal Kontraktgröße mal Kurs zum Quadrat mal 0,01, je Strike. Calls zählen positiv, Puts negativ. Die Zahl sagt, wie stark sich das Delta der Optionsbücher bei einer Kursbewegung von 1 % ändert.
  • Flip: der Kurs, an dem die aufsummierte GEX-Linie das Vorzeichen wechselt, der dem aktuellen Kurs am nächsten liegt. Gibt es im geladenen Strike-Bereich keinen Vorzeichenwechsel, steht dort „–“.
  • Max Γ: der Strike mit dem größten Betrag an GEX.
  • ATM-IV: implizite Volatilität am Strike nächst am Kurs, je Verfall.
  • P/C Open Interest: offene Puts geteilt durch offene Calls.
  • 25Δ-Skew: IV des Calls mit Delta +0,25 minus IV des Puts mit Delta −0,25, in Volatilitätspunkten.

Was sie nicht bedeuten

  • Das Vorzeichen folgt einer Annahme: Marktteilnehmer, die die Calls verkauft haben, sind kurz Gamma, die Puts-Verkäufer ebenso, und die Gegenseite ist die Börse. Wer tatsächlich auf welcher Seite steht, kennt die Optionskette nicht. Open Interest zeigt offene Kontrakte, nicht Käufer und Verkäufer.
  • Flip und Max Γ sind Konventionen, keine Messwerte und keine Kursziele. Sie sind kein Handelssignal und keine Anlageberatung.
  • Der Open-Interest-Stand wird börsentäglich fortgeschrieben, bei Verfällen am selben Tag ist er veraltet.
  • Die Kennzahlen gelten nur für die geladenen Verfälle und Strikes (Voreinstellung: bis 60 Tage, 20 Strikes um den Kurs). Ein enger Strike-Bereich kann einen Flip verdecken.

Fehlende Werte: Liefert die TWS für einen Kontrakt kein Gamma oder kein Open Interest, geht er nicht in die Summe ein. Wie viele Kontrakte bepreist sind, steht in der Kennzahlenleiste („bepreist x / y“) und in der Spalte „Quelle“ der Tabelle. Fehlende Greeks werden nie geschätzt.

Gewichtung: Nur die Karte „Dealer Exposure“ gewichtet auf Wunsch nach Restlaufzeit (Halbwertszeit 7 Tage). Alle übrigen Zahlen sind ungewichtet, damit die Summen in Kopf, Diagramm und Tabelle übereinstimmen.