Integrationen
Alle IntegrationenInteractive Brokers ®
Provider ID4Interactive Brokers on Obermind Stream. Streaming top-of-book quotes, historical bars, and order routing through the TWS API or IB Gateway, for stocks, ETFs, options, futures, FX, and CFDs. How many names can be watched at once is the IB username's market data line allowance.
- CFD
- Commodities
- Equities
- Equity Derivatives
- ETF
- Futures
- FX
- Historical Market Data
- Integrations
- Interest Rates
- Market Data
- OMS / EMS
- Options
- Order Execution
- Precious Metals
Newer provider for new deployments
Interactive Brokers ® IB10The same provider on the current TWS API protocol, with fractional orders, decimal sizes, depth across exchanges, and the CME manual order tag. Use IB10 for new deployments; IB can keep running beside it.
Overview
Obermind Stream connects to Interactive Brokers through the TWS API, using IB Gateway or Trader Workstation. One provider instance is one socket, one client id, and one IB username. That socket carries quotes, historical bars, orders, and account updates.
Live quotes for a large book use streaming top of book. Level II and tick-by-tick run on the same username with much smaller limits.
There are two Interactive Brokers providers. This page covers IB, the original provider, and everything both share: market data lines, pacing, historical bars, instruments, and server setup. New deployments should use IB10, which speaks the current TWS API protocol.
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
Time in Force
- DAY
- GTC
- IOC
- FOK
- GTD
- OPG
- AUC
Real-time Market Data
- Top Of Book
- Order Book (Level II)
- 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
- TWS socket API, no IB client library
Obermind Platform is integrated with the Interactive Brokers TWS API.
IB and IB10
Both providers carry quotes, depth, historical bars, instrument download, orders, and account data over the same Gateway socket. They have the same settings and the same Interactive Brokers tab in the dashboard.
They differ in the TWS API protocol. IB uses the older protocol and handles whole quantities only. IB10 negotiates the current protocol with the Gateway, so sizes and quantities are decimal and newer order fields are available.
Both can run at the same time against one Gateway on different client ids. That is how to move from IB to IB10.
| 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 |
| Overnight session for US stocks | No | Yes |
| Assembly | OberMind.IB | OberMind.IB10 |
What the server needs
What to download:
- IB Gateway, stable channel, version 10.30 or later. It is the only download, and its installer includes Java. See Install IB Gateway below for the link and steps.
- Not the TWS API package. Both providers speak the TWS socket protocol themselves, so there is no IB client library, API installer or ActiveX component to deploy.
The server needs:
- IB Gateway 10.30 or later (or Trader Workstation), logged in with the IB username that holds the market data subscriptions
- A network path from Obermind Stream to the Gateway's API port; running both on the same machine is simplest
- A desktop session for Gateway, which is a Java desktop application and not a Windows service. On Windows, disconnect from Remote Desktop instead of signing out. On Linux, run it on a virtual display such as Xvfb
Install IB Gateway
IB Gateway is the Interactive Brokers login for API connections. It has no charts or watchlists, so the username's market data lines stay free for Obermind Stream.
- 1.Open the IB Gateway download page and pick the stable channel. The latest channel gets new features first and changes more often.
- 2.Download the standalone installer for the server's operating system. Windows and Linux are supported, and the installer brings its own Java runtime.
- 3.Windows: run the installer and accept the defaults. It adds an IB Gateway shortcut.
- 4.Linux: make the downloaded .sh file executable (chmod +x) and run it as the user that will run Gateway.
- 5.Start IB Gateway. On the login screen choose IB API, not FIX CTCI.
- 6.Choose Paper Trading or Live Trading and log in with that IB username. A live login asks for approval in IBKR Mobile.
- 7.Set the API settings below, then leave Gateway running.
Gateway login screen
Fill in the IB Gateway login screen like this:
- API Type: IB API. FIX CTCI is a separate Interactive Brokers FIX service with its own FIX login, and these providers do not use it.
- Trading Mode: Paper Trading for a paper username, Live Trading for a live one.
- Username and Password: the username for that mode. A paper login uses the paper username, not the live one.
Under More Options:
- Select language: any.
- Region: leave the default. Change it only if login is slow or fails.
- Time Zone: the Obermind Stream server's time zone. Historical bar times are read in this zone, so do not change it later.
- Settings directory: leave the default.
- Browser Path, Host and Port: leave empty. They point at the Interactive Brokers login servers, not the API port Obermind Stream connects to. The API port is set after login.
- Verbose Logging, No internet connectivity and Connect through private WAN: leave unticked.
Gateway API settings
In IB Gateway, open Configure, Settings, API, Settings. On a paper login the window title shows the DU account and Simulated Trading.
- 1.Read-Only API: untick it. While it is ticked, Gateway rejects every order.
- 2.Socket port: 4002 for paper, 4001 for live. The provider's Port must match.
- 3.Master API client ID: leave it empty.
- 4.Under API, Precautions, tick Bypass Order Precautions for API Orders, so order size and price warnings do not hold API orders back.
- 5.Click Apply, then OK.
Leave these at the Gateway defaults:
- Download open orders on connection: ticked. The provider reconciles working orders when it connects.
- Maintain connection upon receiving incorrectly formatted fields: ticked, so one bad message does not drop the session.
- Reject messages above maximum allowed message rate vs applying pacing: unticked, so Gateway paces messages instead of rejecting them. The provider paces as well.
- Send market data in lots for US stocks for dual-mode API clients: unticked, so US stock sizes arrive in shares.
- Encode API messages: ASCII 7. Logging Level: Error.
For the first test:
- Tick Create API message log file. Gateway then writes every API message to a log in its settings directory, which shows exactly what was sent and received. Leave Include market data in API log file unticked, and untick the log again once testing is done.
- Do not press Reset API order ID sequence while orders are working.
Run Obermind Stream on the same machine as Gateway. IB Gateway has no Allow connections from localhost only or Trusted IPs option on this page; Trader Workstation does, together with Enable ActiveX and Socket Clients.
Each provider connection needs its own client id. A second client id on the same Gateway shares the username's market data lines.
- IB Gateway live 4001, paper 4002
- TWS live 7496, paper 7497
- Read-Only API off
- One client id per API session
Keeping Gateway running
Gateway restarts itself once a day. Set the time under Configure, Settings, Lock and Exit:
- 1.Choose Auto restart, not Auto logoff.
- 2.Enter the time and pick AM or PM.
- 3.Click Apply, then OK.
The time is in the Time Zone chosen on the Gateway login screen, which should be the server's own time zone.
After a restart the Gateway is back within a minute or two, but it refuses API connections for a few more minutes (about five in testing). Its API message log shows Ignoring API request ... since API is not accepted. Meanwhile the provider shows Connecting and tries again every AutoReconnectInterval seconds (10 by default), and connects once Gateway accepts it. Nothing needs doing.
The Status tab's API session row shows Accepted, Waiting, or how many times Gateway refused the session and since when. If it keeps being refused, check that the API is enabled, that the ClientId is not used by another connection, and that no prompt is open in Gateway.
Pick a time when the markets you trade are closed. For US stocks, in New York time:
- Pre-market from 04:00, regular hours 09:30 to 16:00, after-hours until 20:00.
- A restart between 20:00 and 04:00 New York time misses every session. 20:30 New York time is 01:30 in London.
- New York and London change their clocks on different dates, so for a few weeks each spring and autumn the gap is 4 hours instead of 5. 01:30 London is still after 20:00 New York then.
- With IncludeOvernight on (IB10), US stocks also trade overnight, so any restart time interrupts a session. Pick the quietest hour.
For CME futures without extended-hours stocks, restart inside the daily futures break, 17:00 to 18:00 New York time (22:00 to 23:00 London).
About once a week Gateway needs a full login, approved in IBKR Mobile for a live username. Decide who does this. Tools that automate the login exist, such as the open-source IBC; they run as a separate program and are not part of Obermind.
Historical bar times are read in the Gateway's login time zone. Log in with the server's time zone and do not change it later.
Paper trading account
A paper trading username is a separate login with its own password. Its fills are simulated, so prices and timing differ from live trading. 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 start IB Gateway, choose IB API and Paper Trading, and log in with the paper username. The paper API port is 4002.
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.
Market data on paper
A paper username uses the live username's market data subscriptions only when they are shared with it:
- 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.
- The live username must hold the exchange subscriptions, for example US stocks.
- 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, use delayed prices. The paper login cannot buy them: Client Portal there says this is not a brokerage account. Set MarketDataType to 3 (Paper delayed and real-time, below).
Connect it to Obermind
- 1.Register the provider in Obermind Stream Configuration (Assembly registration, below), then restart Obermind Stream.
- 2.Paste the provider XML below into OberMind.XmlProviderManagerSettings. Set Host, Port, ClientId, MarketDataLines, and the DU account code in DefaultAccount and MonitoredAccount.
- 3.Connect the provider on the dashboard Providers page.
- 4.Open the Interactive Brokers tab and check Status: connected, the server version, and the IB account.
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 this provider (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.
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: 4 for IB, 6 for IB10. When both run, give the instrument one AltId on each.
- 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 4 (IB) or 6 (IB10) 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 4 (IB) or 6 (IB10) 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.
Usernames and client ids
- One provider instance uses one client id on one Gateway.
- A second client id on the same Gateway shares the username's lines.
- A second IB username has its own line allowance, and needs its own Gateway login and its own provider instance.
- Lines are counted per username. Every TWS watchlist on that username draws from the same pool.
- In TWS, Ctrl+Alt+= (Cmd+Opt++ on macOS) shows how many lines are in use.
Streaming top of book
A streaming top-of-book subscription (bid, ask, and last) holds one market data line until it is cancelled.
IB samples the feed rather than sending every tick:
- US stocks, futures, bonds, and indices: every 250 ms
- US options: every 100 ms
- FX: every 5 ms
- Other products: every 250 ms
The subscribe itself counts toward the API request rate, which is half the line allowance per second (50 requests per second at the default 100 lines). The ticks after that do not.
A one-shot snapshot returns the latest values and releases the line after about 11 seconds, so snapshots cannot watch more names than the line cap at the same time.
Exchange fees are separate from the line cap. A line is permission to watch one more name; a market data subscription (for example a US network) is permission to see that venue live.
Market data lines
Every IB username starts with 100 concurrent lines and never goes below 100. After the first month, the allowance is the greatest of:
- 100
- USD monthly commissions divided by 8
- USD equity divided by 10,000 (rounded down)
Examples:
- Equity of 950,000 and 16 dollars of commissions: 100 lines
- Equity of 1,245,000: 124 lines
- Equity of 10,000,000: 1,000 lines
- Commissions of 8,000 dollars in a month: 1,000 lines
IB publishes no ceiling on lines earned from equity and commissions. The same pool covers TWS watchlists and every API client logged in with that username.
For an advisor or broker, IB adds up commissions and equity across the accounts and gives every account that same line count.
Quote booster packs
A Quote Booster is an extra concurrency pack. It is not an exchange feed and not a row in the streaming price table.
- 30 US dollars a month per pack
- Each pack adds 100 Level I lines and one Level II symbol, on top of the lines earned from equity and commissions
- Up to 10 packs per account; ten packs on the 100-line minimum reach 1,100 Level I lines
- The lines are available in TWS and the API after the next login
- A cancelled pack lasts to the end of the billing period
On the Market Data Pricing page it sits in the Level 2 section, under Market Data Type, after the simultaneous depth-of-book limit. In Client Portal it is its own tab on the subscribe form: Settings, User Settings, Trading Platform, Market Data Subscriptions, then the configure gear.
Depth and tick-by-tick stop growing with the line count. IB treats depth capacity above about 1,100 lines as a special arrangement.
Professional and non-professional
Professional and non-professional are the exchange's labels for who may buy a data package. They set the monthly fee, and they are separate from the IBKR Pro and IBKR Lite account types.
A non-professional subscriber is a natural person whom the vendor has accepted as non-professional, and who:
- is not registered or qualified with the SEC, the CFTC, a state securities agency, a securities exchange or association, or a commodities or futures market
- is not an investment adviser under the Investment Advisers Act of 1940
- is not employed by a bank or another organization exempt from registration to do work that would require that registration
Corporations, trusts, organizations, institutions, and partnership accounts fall outside that definition. A person who fails any of those tests, any organization, and any business use of the data is professional.
The same package then has two prices:
- US Equity and Options Add-On Streaming Bundle: 4.50 US dollars a month non-professional, 125 professional
- Cboe One Level 1: 1 US dollar against 5
- Some feeds, including Nordic Derivatives Level 1, are not sold to professionals at all
For streaming US NBBO, a non-professional takes the matching network (NYSE Network A, Network B, or NASDAQ Network C), or the US Securities Snapshot and Futures Value Bundle with the equity and options add-on. A professional takes the same network, or the Professional US Securities Snapshot Bundle with that add-on.
Client Portal shows the status on Market Data Subscriptions and keeps the non-professional questionnaire there. The configure screen also asks whether the data is for Trader Workstation, another display, or a non-display API application. A feed that a platform shows to a broker's clients is a professional use.
Fees are charged per username and cannot be shared across usernames on the same account. An account with less than 500 US dollars of equity has its market data turned off until equity is back above that level.
Market data line allocation
Streaming top of book can use every line. Tick-by-tick and Level II cannot:
- Tick-by-tick: about 5 percent of the lines, and not available for options
- Level II: one unique symbol per 100 lines, at least 3 and at most 60
The last column is how many Quote Booster packs produce that band when starting from the 100-line minimum. Equity and commissions can reach the same band with fewer packs. A book of hundreds of names uses streaming top of book.
| Number of Market Data Lines | Max Tick-by-Tick Subscriptions | Max Market Depth (Level II) Symbols | Quote Booster Packs Needed |
|---|---|---|---|
| 100 | 5 | 3 | 0 (Default) |
| 101 – 200 | 10 | 3 | 1 |
| 201 – 300 | 15 | 3 | 2 |
| 301 – 400 | 20 | 3 | 3 |
| 401 – 500 | 25 | 4 | 4 |
| 501 – 600 | 30 | 5 | 5 |
| 601 – 700 | 35 | 6 | 6 |
| 701 – 800 | 40 | 7 | 7 |
| 801 – 900 | 45 | 8 | 8 |
| 901 – 1000 | 50 | 9 | 9 |
| 1001 – 1100 | 55 | 10 | 10 (Max packs) |
Watching 1,000 products
One thousand streaming names need one thousand market data lines on the usernames that feed Obermind Stream. On a single username, any one of these reaches that count:
- Equity of 10,000,000 US dollars (10,000,000 / 10,000)
- Commissions of 8,000 US dollars in the month (8,000 / 8)
- Nine Quote Booster packs on an account that still has the 100-line minimum (100 + 900)
Ten packs reach 1,100 and leave a spare hundred lines for the TWS watchlist.
Where the account cannot be allocated more lines, split the universe across IB usernames. Ten usernames at the 100-line minimum cover 1,000 names, each with its own Gateway login, its own provider instance, and its own exchange subscriptions. Subscribing the same symbol on two usernames uses two lines and two entitlements.
The Web API uses this same line pool, updates at most every 500 ms, and drops each stream after 15 minutes. FIX sessions carry orders. Quotes stay on the TWS API.
Historical bars
Historical bars use the same Gateway socket as the quotes. A request does not hold a market data line, but the username still needs a market data subscription that covers the product.
A chart history request, or Data Manager, Import Historical with this provider selected, sends one historical request. These provider settings apply:
- WhatToShow: the series, TRADES by default
- UseRTH: keep bars inside regular trading hours
- IncludeExpired: allow history for an expired contract
- PaceHistoricalRequests: hold requests until they fit IB's limits, on by default
The end of the requested range is the end time. A span shorter than a day is sent in seconds, shorter than a year in days, and longer in years, always rounded up. Bars before the requested start are dropped. IB rejects a bar size that is too fine for the span.
IB paces every client:
- No identical request within 15 seconds
- No more than six requests for the same contract, exchange, and tick type within two seconds
- No more than 60 requests in any ten minutes; BID_ASK counts as two
The provider holds each request until it fits those limits, so a long import waits instead of failing.
Not available: bars of 30 seconds or less older than six months (refused before sending), expired futures more than two years after expiry, expired options, and combo history. ADJUSTED_LAST is sent without an end time. Any other bar size is rejected before it is sent.
- 1, 5, 10, 15, and 30 second bars
- 1, 2, 3, 5, 10, 15, and 30 minute bars
- 1, 2, 3, 4, and 8 hour bars
- 1 day, 1 week, and 1 month bars
- WhatToShow: TRADES, MIDPOINT, BID, ASK, BID_ASK, ADJUSTED_LAST
Orders
Orders go out on the same socket as the quotes.
- On IB, quantity must be a whole number. A fractional quantity is rejected with a message rather than rounded. IB10 sends fractional quantities.
- A trailing stop sends the order's trailing amount, and the initial stop price when one is set.
- A trailing stop limit also needs a limit price and an initial stop price.
- A limit order with time in force AUC goes out as Market To Limit.
- DefaultAccount is used when the order has no account of its own.
- OutsideRTH lets orders trigger or fill outside regular hours.
Market data settings
- MarketDataLines: the IB username's line allowance, 100 by default. It sets the outgoing request pace (half the lines per second, at least 50) and warns when subscriptions go over it.
- MarketDataType: live (1), frozen (2), delayed (3), or delayed frozen (4), sent once on connect. 1 is not sent, because live is IB's default. Changing it needs a reconnect, then subscribe again. Delayed data needs no exchange subscription.
- RequestMarketDepth: Level II for every subscribed instrument, off by default, within IB's cap of one symbol per 100 lines. On IB, depth needs a direct exchange, not SMART. IB10 also gives depth aggregated across exchanges for a SMART instrument.
- MarketDepthRows: rows per side, 10 by default.
A TWS warning, such as delayed data being shown, does not drop the subscription.
Accounts and positions
With UseMonitoredAccount on, the provider subscribes to the IB account named in MonitoredAccount and publishes balances and positions. WaitAccountData holds the connected state until that first download finishes.
An advisor account can still set a default allocation; the monitored account is the one whose values are streamed.
IBKR references
Line counts, booster packs, and professional fees are set by Interactive Brokers and the exchanges. These are the pages those figures come from.
Assembly registration
Register this provider in Obermind Stream Configuration. Id 0 uses the id from the class, which is 4. Provider ids are 1 to 99; 100 and up are reserved for internal algos. Only include this provider's assembly block.
<Provider> <TypeName>OberMind.IB.IBTWS, OberMind.IB</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.
- Replace DU0000000 with the IB account code.
- ClientId must be unique among API sessions on that Gateway.
- Set MarketDataLines to the username's line allowance.
WhatToShow, UseRTH, and PaceHistoricalRequests apply to historical bars.
<provider>
<id>4</id>
<instance>1</instance>
<properties>
<property name="Host" null="false">127.0.0.1</property>
<property name="Port" null="false">4001</property>
<property name="ClientId" null="false">1</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="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. Streaming top-of-book quotes, historical bars, and order routing through the TWS API.
Verwandte Integrationen
Alle IntegrationenInteractive Brokers ® IB10
The current TWS API protocol: decimal sizes, fractional orders, SMART depth, and CME order tagging, beside the original IB provider.
- 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