Integrationen
Alle IntegrationenInteractive Brokers ® IB10
Provider ID6Interactive Brokers on Obermind Stream over the current TWS API protocol. Streaming quotes, depth, historical bars, instrument download, and orders through IB Gateway, with decimal sizes, fractional orders, depth aggregated across exchanges, and the CME manual order tag.
- CFD
- Commodities
- Equities
- Equity Derivatives
- ETF
- Futures
- FX
- Historical Market Data
- Integrations
- Interest Rates
- Market Data
- OMS / EMS
- Options
- Order Execution
- Precious Metals
Overview
IB10 connects Obermind Stream to Interactive Brokers through IB Gateway or Trader Workstation, using the current TWS API protocol. It does everything the original Interactive Brokers provider does, with the same settings, the same dashboard tab, and the same instrument and historical rules.
The current protocol adds:
- Decimal sizes and quantities, and fractional orders
- Depth aggregated across exchanges for SMART instruments
- The CME Rule 576 manual order tag
- Orders that also trade in the US overnight session
Market data lines, Quote Booster packs, pacing, professional fees, historical limits, and server setup are the same for both providers. They are described on the Interactive Brokers page.
Markets
- Equities
- ETFs
- Options
- Futures
- Future Options
- FX
- Indices
- CFDs
- Commodities
- Precious Metals
- Interest Rates
Order Types
- Market Order
- Limit Order
- Stop Order
- Stop Limit Order
- Market On Close Order
- Market To Limit Order
- Pegged Order
- Trailing Stop Order
- Trailing Stop Limit Order
- Fractional Quantities
Time in Force
- DAY
- GTC
- IOC
- FOK
- GTD
- OPG
- AUC
Real-time Market Data
- Top Of Book
- Order Book (Level II)
- Order Book across Exchanges (SMART Depth)
- Trades (last price and size)
- Delayed Market Data
Historical Market Data
- Time Bars from 1 Second to 1 Month
- Trades, Midpoint, Bid, Ask, Bid/Ask, Adjusted Last
- Paced to IB Historical Limits
Portfolio
- Instrument Download
- Account Currency
- Account Balance
- Account Equity
- Open Positions
Connectivity
- IB Gateway or Trader Workstation
- Current TWS API protocol
- TWS socket API, no IB client library
Obermind Platform is integrated with the Interactive Brokers TWS API.
What is different from IB
| Feature | IB | IB10 |
|---|---|---|
| Provider id | 4 | 6 |
| TWS API protocol | Older (client version 59) | Current (server version 100 to 197) |
| Quantities and sizes | Whole numbers | Decimal, fractional orders |
| Level II on SMART | No, needs a direct exchange | Yes, aggregated across exchanges |
| CME Rule 576 manual order tag | No | Yes, ManualOrderIndicator |
| Overnight session for US stocks | No | Yes, IncludeOvernight |
| Assembly | OberMind.IB | OberMind.IB10 |
Server setup
IB10 needs the same server setup as the Interactive Brokers provider. The installation and Gateway settings are on that page.
What to download:
- IB Gateway, stable channel, version 10.30 or later (link below). It is the only download, and its installer includes Java.
- Not the TWS API package. IB10 speaks the TWS socket protocol itself, so there is no IB client library or installer on the server.
Gateway settings:
- Read-Only API off.
- A client id that no other API session on that Gateway uses, including the IB provider.
Paper trading account
Test IB10 on a paper username first. It is a separate login with its own password, and it needs no extra download: the paper username logs in to the same IB Gateway.
With an IBKR account:
- 1.Log in to Client Portal with the live username.
- 2.Open the user menu (the head-and-shoulders icon, top right), then Settings.
- 3.Under Account Configuration, open Paper Trading Account. The row already shows the paper account number.
- 4.Note the paper trading username and account number. The account number starts with DU, for example DUQ123456.
- 5.Set or reset the paper password on the same page.
Then log in to IB Gateway:
- API Type IB API (not FIX CTCI), Trading Mode Paper Trading, and the paper username and password.
- Under More Options, set Time Zone to the Obermind Stream server's time zone and leave Host and Port empty.
- After login, set the API socket port to 4002 and turn Read-Only API off. The Interactive Brokers page has every setting.
For live prices on paper, share the live username's market data:
- 1.In Client Portal, open Settings, then Paper Trading Account under Account Configuration.
- 2.Set Share real-time market data subscriptions with paper trading account to Yes.
- 3.Under Select the username whose market data you want shared, pick the live username that holds the subscriptions, and save.
Only one of the live and paper usernames can have an active session at a time. While the live username is logged in elsewhere, the paper session gets no shared data. Without shared data, set MarketDataType to 3. The paper login's Client Portal says this is not a brokerage account and cannot sell subscriptions (Paper delayed and real-time, below).
Without an IBKR account:
- Sign up for the IBKR free trial with an email address. It gives a paper username with simulated funds.
- The trial includes Trader Workstation. Its API port for paper is 7497. In TWS, open File, Global Configuration, API, Settings, turn on Enable ActiveX and Socket Clients and turn Read-Only API off.
- Trial market data is delayed by 10 to 15 minutes, except OTC spot FX and spot metals. Set MarketDataType to 3.
Connect IB10 on paper
- 1.Register the IB10 assembly in Obermind Stream Configuration (Assembly registration, below), then restart Obermind Stream.
- 2.Paste the provider XML below into OberMind.XmlProviderManagerSettings with id 6, Port 4002, a ClientId no other API session uses, and the DU account code in DefaultAccount and MonitoredAccount.
- 3.Connect provider 6 on the dashboard Providers page.
- 4.Open the Interactive Brokers tab and pick IB10 under Provider.
Status should show:
- Connected. Connecting means Gateway has not accepted the API session yet, which is normal for a few minutes after a Gateway restart. The API session row shows Accepted, or how often it was refused.
- A server version close to 197. A lower number means an older Gateway; 100 is the minimum.
- The DU paper account.
- Messages skipped at 0. A higher number means a message the provider could not read.
Before the first test, in Gateway's API settings:
- Tick Create API message log file, so every message IB10 sends and receives is in Gateway's log.
- Keep Maintain connection upon receiving incorrectly formatted fields ticked, so a message IB10 gets wrong does not drop the session.
A first test on paper:
- Subscribe to a few instruments and check prices arrive. With no subscription, set MarketDataType to 3 and connect the provider again first (Paper delayed and real-time). Each needs an AltId on provider 6 (Instruments and AltIds, below).
- Request historical bars for one of them.
- Search for a contract on the Interactive Brokers tab.
- Send a small limit order, then cancel it.
- Send a fractional order on a US stock that supports fractions.
- With RequestMarketDepth on, check that a SMART stock gets Level II.
Instruments and AltIds
Interactive Brokers identifies a contract by symbol, security type, exchange and currency, or exactly by its contract id. The instrument's AltId on this provider holds the Interactive Brokers side, and the catalogue instrument supplies the rest.
The AltId fields:
- Provider: 6. An instrument that also trades on IB keeps its AltId on 4 as well.
- Symbol: the IB symbol, optionally followed by a bar and the IB contract id, for example AAPL|265598. With the contract id IB matches exactly one contract, so it is the safest form.
- Exchange: SMART, a bar and the primary exchange for smart-routed stocks and ETFs (SMART|NASDAQ), or one exchange, such as IDEALPRO for FX or CME for E-mini futures.
- Alt currency: the contract currency. For FX it is the quote currency: EUR.USD is symbol EUR with currency USD.
From the catalogue instrument:
- Type sets the IB security type: Stock and ETF send STK, FX sends CASH, Future FUT, Option OPT, FutureOption FOP, Index IND, CFD CFD.
- Maturity sets the expiry of futures and options. Options also send Put/Call and Strike.
- Factor is sent as the IB multiplier: 1 for stocks, ETFs and FX, and the contract multiplier for futures and options, for example 50 for E-mini S&P 500 and 100 for US equity options.
- An FX instrument set up in lots for another provider (factor 100000) sends multiplier 100000. Test it on paper first, and use an FX instrument with factor 1 if IB rejects the contract.
The contract ids below are examples. Confirm each one with the contract search on the Interactive Brokers tab before trading.
Examples:
| Instrument | Type | Factor | Symbol | Exchange | Alt currency |
|---|---|---|---|---|---|
| AAPL | Stock | 1 | AAPL|265598 | SMART|NASDAQ | USD |
| MSFT | Stock | 1 | MSFT|272093 | SMART|NASDAQ | USD |
| SPY | ETF | 1 | SPY|756733 | SMART|ARCA | USD |
| EURUSD | FX | 1 | EUR|12087792 | IDEALPRO | USD |
| ESZ6 (maturity 18 Dec 2026) | Future | 50 | ES | CME | USD |
Paper delayed and real-time
The AltId is the same on paper and live. Live or delayed comes from MarketDataType, which is sent once when the provider connects. 1 is live, and it is not sent, because live is IB's default. 3 is delayed. After changing it, connect the provider again and subscribe again. A request IB rejects is finished, so the old subscription does not resume on its own.
The sample provider XML further down has MarketDataType 1. For a paper test with no subscription, change that property to 3 before connecting.
Paper with delayed data. The paper username cannot buy market data. Logged in as that user, Client Portal says this is not a brokerage account, and Market Data Subscription Manager is empty. A free trial with no live account shows the same page. Delayed data needs no subscription:
- 1.Set MarketDataType to 3.
- 2.Connect the provider again.
- 3.Subscribe to the instrument.
The ES row in the table is valid on paper. IB reads it as ESZ6, the December future, and the futures data farm connects. Error 354 on that request means live CME data is not subscribed. The same line says delayed data is available, which is what MarketDataType 3 asks for.
Real-time with a market data subscription:
- 1.Log in to Client Portal with the live username. The paper username cannot open Market Data Subscriptions.
- 2.Subscribe to streaming top of book for each venue in the table. A snapshot bundle still returns error 354, because the provider requests streaming top of book.
- 3.To use those subscriptions on paper, share them with the paper account and log out of the live username. Only one of the two can be in a session.
- 4.Set MarketDataType to 1, connect the provider again, and subscribe.
- On a free trial, spot FX and spot metals stay live. Other markets are delayed.
- IDEALPRO FX on a funded account is included. Stocks, ETFs and futures each need their own venue.
Two replies mean the contract was accepted and the prices were refused. 354 says the market data is not subscribed. 10089 says it requires an additional subscription for the API. Both add that delayed data is available. Market data farm connection is OK means the connection reached the exchange, and the entitlement is checked after that.
| Setting | Paper, delayed | Real-time |
|---|---|---|
| MarketDataType | 3 | 1 |
| Gateway login | Paper username, port 4002 | Live username, port 4001, or paper after sharing |
| Subscriptions | None. The paper login cannot sell them | Streaming top of book, on the live username |
| AAPL, MSFT | Delayed NASDAQ | NASDAQ streaming |
| SPY | Delayed NYSE Arca | NYSE Arca streaming |
| ES December 2026 | Delayed CME | CME streaming |
| EURUSD | Delayed IDEALPRO | IDEALPRO, included with the account |
Adding AltIds in Dash
Import creates the instrument and its AltId in one step:
- 1.Open Data Manager, Import Instruments, and choose 6 under Provider.
- 2.Enter the symbol in Symbol filter, optionally with Exchange filter and Type filter, and press Request. IB answers per symbol and has no catalogue download.
- 3.Select the rows, press Preview import, check the preview, and import.
Each contract becomes one instrument with its contract id, tick size, multiplier as the factor, expiry, strike and name, and an AltId in the format above. The SMART route is used when IB offers it.
- FX is named base and quote (EURUSD)
- Futures and options take the IB local symbol without spaces (ESZ6)
- Smart-routed stocks keep their primary exchange
For instruments already in the catalogue, tick Link to Instrument(s) and press Preview attach. Nothing new is created: each row is matched to the existing instrument by symbol and its AltId is added.
To add or change an AltId by hand:
- 1.In Obermind Dash, open Instruments, select the instrument and press Update.
- 2.Under Alternative IDs, press Add AltId.
- 3.Choose provider 6 under Provider, then fill in Symbol, Exchange and Alt currency as in the examples.
- 4.Press Save. A changed symbol resubscribes the instrument straight away, without a restart.
With several instruments selected, editing Alternative IDs replaces the list on all of them. Add AltIds one instrument at a time.
The Interactive Brokers tab on the Providers page searches contracts straight from the Gateway and shows each contract id. It also shows the connection, market data lines in use, subscriptions, account values, positions, and open orders.
Protocol
When it connects, IB10 offers the Gateway a range of protocol versions. The Gateway answers with the highest one both support. The dashboard shows it on the Interactive Brokers tab: Status, with IB10 picked under Provider.
Each message is read on its own. A message the provider cannot read is skipped and counted on Status rather than closing the connection.
MaxServerVersion caps the version offered. Lowering it makes the Gateway fall back to an older message layout without a new build.
Settings
IB10 has every setting of the Interactive Brokers provider, including Host, Port, ClientId, MarketDataLines, MarketDataType, RequestMarketDepth, WhatToShow, UseRTH, PaceHistoricalRequests, DefaultAccount, and MonitoredAccount. It adds three:
- MaxServerVersion: highest protocol version offered, 197 by default and 100 at least
- ManualOrderIndicator: CME Rule 576 tag on orders and cancels; -1 not sent, 0 automated, 1 manual
- IncludeOvernight: let US stock orders also trade in the overnight session, off by default
Running beside IB
IB and IB10 can be connected to one Gateway at the same time, each with its own client id. IB10 can then be checked on a paper username while IB keeps running.
Both draw on the same market data lines of the IB username.
Assembly registration
Register this provider in Obermind Stream Configuration. Id 0 uses the id from the class, which is 6. Provider ids are 1 to 99; 100 and up are reserved for internal algos. Only include this provider's assembly block.
<Provider> <TypeName>OberMind.IB10.IBTWS, OberMind.IB10</TypeName> <Id>0</Id> <X64>true</X64> </Provider>
Stream provider XML
Paste this provider element into OberMind.XmlProviderManagerSettings.
- Point Host and Port at IB Gateway; 4002 is the paper port.
- Replace DU0000000 with the IB account code.
- Use a ClientId that no other API session on that Gateway uses, including the IB provider.
- Set MarketDataLines to the username's line allowance.
<provider>
<id>6</id>
<instance>1</instance>
<properties>
<property name="Host" null="false">127.0.0.1</property>
<property name="Port" null="false">4002</property>
<property name="ClientId" null="false">2</property>
<property name="DefaultAccount" null="false">DU0000000</property>
<property name="MonitoredAccount" null="false">DU0000000</property>
<property name="UseMonitoredAccount" null="false">True</property>
<property name="WaitAccountData" null="false">False</property>
<property name="OutsideRTH" null="false">False</property>
<property name="TreatSellShortAsSell" null="false">True</property>
<property name="WhatToShow" null="false">TRADES</property>
<property name="UseRTH" null="false">True</property>
<property name="IncludeExpired" null="false">False</property>
<property name="ContractExpiryFormat" null="false">yyyyMM</property>
<property name="PaceHistoricalRequests" null="false">True</property>
<property name="MarketDataLines" null="false">100</property>
<property name="MarketDataType" null="false">1</property>
<property name="RequestMarketDepth" null="false">False</property>
<property name="MarketDepthRows" null="false">10</property>
<property name="MaxServerVersion" null="false">197</property>
<property name="ManualOrderIndicator" null="false">-1</property>
<property name="IncludeOvernight" null="false">False</property>
<property name="Enabled" null="false">True</property>
<property name="AutoReconnect" null="false">True</property>
<property name="AutoReconnectInterval" null="false">10</property>
</properties>
</provider>Verfügbar auf der Obermind-Plattform. Current TWS API protocol: fractional orders, decimal sizes, and depth across exchanges.
Verwandte Integrationen
Alle IntegrationenInteractive Brokers ®
TWS API quotes, historical bars, and orders. Concurrent live quotes share the IB username's market data lines, 100 by default.
- CFD
- Commodities
- Equities
- +12
Bloomberg EMSX
EMSX execution for equities, futures and options through the Bloomberg Server API or Terminal: brokers and accounts per asset class, broker strategies, broker reject text, and prices from another feed.
- Equities
- Equity Derivatives
- ETF
- +5
TT® API
TT® (Trading Technologies) is a trading platform providing access to futures markets through a large number of clearing firms and broker/dealers.
- Integrations
- Market Data
- OMS / EMS
- +1