2.17

🌉 IBKR Live Bridge

Реальные греки, IV и бид/аск напрямую в sTraderZ.com

1. Что такое IBKR Live Bridge?

С IBKR Live Bridge вы видите данные по открытым опционам и портфелю с греками в реальном времени, подразумеваемой волатильностью, Bid/Ask и P&L прямо в straderz.com — как дополнение к ежедневной синхронизации через Flex Query.

Что вы видите в Live Cockpit:
  • Живые греки (Δ, Γ, Θ, V) для каждой открытой опционной позиции
  • Подразумеваемая волатильность и Bid/Ask в реальном времени
  • Δ и Θ портфеля, суммированные по всем позициям — сразу видно, когда книга становится слишком длинной или слишком короткой
  • Баланс счёта и маржа в реальном времени
  • Опционные цепочки по запросу для анализа «что если»
Дополняет — не заменяет.
Bridge работает параллельно с ночной синхронизацией Flex Query. Flex остаётся источником истины для официальной истории сделок (налоги, распознавание стратегий, кампании). Bridge предоставляет путь в реальном времени для активного управления опционами.
✨

Как это работает

Live Bridge — небольшое локальное приложение на вашем ПК, которое связывается с запущенным TWS или IB Gateway через API IBKR и отправляет зашифрованные снимки данных в straderz.com. Ваш логин IBKR полностью остаётся на вашем компьютере — мы не получаем ни ваш пароль, ни коды 2FA.

[Ваш ПК]                                        [straderz.com]                                  [Вы в браузере]
TWS / IB Gateway
    ↓ ib_insync TCP
[Live Bridge] ──── HTTPS POST ────►  [Сервер] ◄──── HTTPS GET ──── [Live Cockpit]
    │                                    │
    └─ читает позиции,                    └─ сохраняет снимки,
       греки, IV, Bid/Ask                    передаёт их в ваш браузер
Поток данных в общих чертах:
  • Только чтение, не торговля — Bridge не размещает ордеров. Он лишь отправляет позиции, греки, IV, Bid/Ask, баланс счёта.
  • Изолировано по пользователям — каждый снимок привязан к вашему счёту через OAuth-токен; другие пользователи его никогда не видят.
  • Задержка ~2 секунды от тика IBKR до отображения в кокпите.
  • HTTPS push с bearer-токеном, опрос браузером на основе ETag для минимальной нагрузки на данные.

3. Требования

  • Windows 10 или 11 — версия для Mac готовится (см. примечание ниже)
  • Счёт IBKR с запущенным TWS (Trader Workstation) или IB Gateway
  • Включённый IBKR API — в TWS в разделе Configuration → API → Settings включите «Enable ActiveX and Socket Clients»
  • Счёт sTraderZ.com (бесплатный или Premium)
  • Опционально: подписка IBKR на рыночные данные для данных в реальном времени — см. «Подписка на рыночные данные и задержанные котировки»
⏳ Версия для Mac
Bridge пока работает только на Windows. Версия для Mac готовится — до тех пор пользователи Mac продолжают использовать синхронизацию Flex Query как основной канал данных.

Пошаговое руководство

1

Установка

1. Скачайте Bridge:
Скачайте Bridge со страницы загрузок или напрямую из настроек Live Bridge.

2. Запустите Bridge:
Дважды щёлкните по straderz-bridge.exe. Окно не открывается — Bridge работает в фоновом режиме. Значок Bridge появится в системном трее (справа внизу рядом с часами).

3. Запустите TWS или IB Gateway параллельно:
Запустите ваше обычное ПО IBKR и войдите в систему. Bridge автоматически обнаруживает запущенный шлюз и подключается к нему.
2

Сопряжение с straderz.com

1. Начните сопряжение в straderz.com:
Перейдите в Счета → Live Bridge и нажмите «Подключить к straderz.com».

2. Диалог авторизации в браузере:
Откроется страница подтверждения с именем вашего счёта. Нажмите «Подключить» — процесс OAuth выполняется с PKCE, поэтому Bridge никогда не видит ваш пароль.

3. Проверьте статус в трее:
Нажмите на значок Bridge в трее. Статус должен показывать ✅ подключено.

4. Первые данные в кокпите:
Переключитесь на Live Cockpit. В течение нескольких секунд появятся ваши открытые позиции с живыми греками и IV.

6. Мультисчёт: личный, бизнес и фонд параллельно

Если у вас несколько счетов IBKR — например, личный счёт + бизнес-депо + фонд — вы можете вывести их все в кокпит в реальном времени одновременно.

Настройка:
Запустите несколько экземпляров IB Gateway параллельно, каждый на своём порту (напр. :7497 для личного, :7498 для бизнес-счёта, :7499 для фонда). Bridge автоматически обнаруживает все шлюзы и помечает каждую позицию соответствующим счётом.

В кокпите вы затем можете переключаться между счетами или видеть агрегированный вид по всем счетам.

💡 Совет: Официальная документация IBKR описывает настройку параллельных шлюзов в разделе «IB Gateway User Guide → Running Multiple Instances». Используйте отдельный логин IBKR (субсчёт) для каждого экземпляра.
✨

Подписка на рыночные данные и задержанные котировки

Bridge использует вашу существующую подписку IBKR на рыночные данные — вторая подписка в straderz.com не требуется. Если вы оплачиваете «US Securities Snapshot and Futures Value Bundle» или аналогичный пакет в IBKR, эти данные в реальном времени автоматически поступают в кокпит.

Без подписки IBKR: Bridge предоставляет только котировки с задержкой 15 минут. Важно знать: это касается и отображения в TWS. Без подписки IBKR принципиально предоставляет только задержанные котировки, независимо от фронтенда (TWS, Bridge, мобильное приложение, другие торговые приложения). Bridge этого не меняет.

С подпиской IBKR: Данные в реальном времени одновременно в TWS И straderz.com. Вы видите те же значения в реальном времени, что и в TWS.

Рекомендация для активной торговли опционами:
Как минимум «US Securities Snapshot and Futures Value Bundle» или отдельный пакет опционных данных. Подробности и актуальные цены в IBKR Client Portal в разделе Settings → User Settings → Market Data Subscriptions.

8. Эксплуатация

  • Bridge работает в фоновом режиме — значок в трее, низкое потребление RAM, интерфейс не нужен.
  • Автообновления — Bridge проверяет наличие новых версий при запуске. Если обновление доступно, в меню трея появляется уведомление.
  • Остановка Bridge — щёлкните правой кнопкой по значку в трее → «Quit». Кокпит после этого показывает последнее известное состояние с пометкой «stale».
  • Отзыв подключения — в разделе Счета → Live Bridge нажмите «Отключить». Токен немедленно отзывается на сервере и больше не может использоваться для снимков.
  • Примечание о 2FA (важно): Включите в IBKR «Extended Session», иначе вам придётся заново входить в TWS каждые ~24 часа — а Bridge в это время простаивает. Инструкции в IBKR Account Management в разделе Settings → Account Settings → Secure Login System.

⚠️ Устранение неполадок

В трее показывается «Offline» или «No connection»:
TWS или IB Gateway не запущены, либо API-сокет не включён. Проверьте требования из раздела 3.

«Pairing failed»:
Токен был отозван или истёк. Решение: в настройках Live Bridge нажмите «Connect to straderz.com» и выполните сопряжение заново.

Кокпит показывает только задержанные котировки:
Нет подписки IBKR на рыночные данные (см. «Подписка на рыночные данные и задержанные котировки»). При наличии подписки данные в реальном времени передаются автоматически.

«Обновления не приходят»:
Проверьте статус Bridge в трее. Если показано «connected», но обновления не приходят: перезапустите TWS или IB Gateway — TCP-соединение может зависнуть из-за изменений сети (напр. WiFi/LAN).

Bridge зависает или падает:
Завершите Bridge в трее, перезапустите его. При повторяющихся сбоях: установлена ли последняя версия? Скачайте последнюю версию со страницы загрузок.

Ещё не настроен счёт IBKR?
Live Bridge требует, чтобы счёт IBKR уже был подключён через Flex Query (для истории сделок). → Глава 2.1 — Настройка 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.