10 votes
Accepted

Market Making Strategy to Interact with IB API

Pete's seven year old answer is just as relevant now as it was in 2011. None of the limiting factors of their API has changed since then, so this is essentially an extensive reiteration. The ...
Theodore's user avatar
  • 1,172
8 votes

Interactive Brokers: Automating collection of client account position without TWS/IB Gateway

IB has something called "Flex Web Service", which allows you to download flex queries without being logged in; see Using the Flex Web Service. The R package IButils,...
Enrico Schumann's user avatar
5 votes
Accepted

3rd party API like IBPy for Interactive Brokers python API?

The problem with using IbPy is not only that it does not support Python 3 but even more importantly it's anchored to an older version of IB's API so it's missing a lot of features IB has added in ...
Brian from QuantRocket's user avatar
4 votes

Send TRAIL STOP order when price hits a certain level, with IB TWS

I think what you are looking for is an Adjustable Stop Orders (https://www.interactivebrokers.com/en/index.php?f=574). Using adjustable-stop-order you can limit your losses in case the price falls ...
user2979010's user avatar
4 votes
Accepted

Interactive Broker API error 321?

Try changing LocalSymbol to tradingClass and changing Last..Month to ...
amdopt's user avatar
  • 4,338
4 votes
Accepted

After hours data - Interactive Brokers

The function reqHistoricalData has an argument useRTH ("use regular trading hours"). Set ...
Enrico Schumann's user avatar
3 votes

Whats the need of Executing brokers if Prime brokers are the protagonist?

A prime broker is like a General Practitioner doctor. Executing Broker is like a specialist. If you needed brain surgery, you would not have your GP do it. Executing brokers specialize in specific ...
Bikenfly's user avatar
  • 454
3 votes

How do I change the time zone in the interactive brokers API?

The time zone is chosen by the user on the login screen before logging in. Click more options under the login button. A menu should appear like the image below. Select your desired timezone there. ...
amdopt's user avatar
  • 4,338
3 votes

What exactly is a contract's "trading class"?

For IB's API, trading classes act as another layer for the unique identification of securities which otherwise might be ambiguous. On occasion something will trade with the same symbol, expiration, ...
MonteCarloSims's user avatar
3 votes

Market data for options

You can get Options data from algoseek.com. They provide historical and live OPRA feed from 2012 to the present, and you are not required to install any specific software. AlgoSeek provides flexible ...
Amanda's user avatar
  • 51
3 votes
Accepted

Are there any integrated framework that I can back-test and paper/live trading in one place?

Remember that all back testing is full of lies assumptions. Latency (both line latency and latency internal to the exchanges), adverse selection, market impact (yes, even you have market impact), etc, ...
Thomas Johnson's user avatar
3 votes

How to lower intraday trading commisions

Assuming you are a individual trader, there are a variety of commission-free brokers with APIs, including Alpaca, Tradier, E*Trade, Ally Invest, and TD Ameritrade, among others. These brokers send ...
Brian from QuantRocket's user avatar
3 votes

How do Personal Finance companies get access to their customers investment accounts?

I would reach out to SnapTrade. You would connect your platform to them, and in turn they allow your customers to connect numerous brokerage accounts to your platform.
Brian from QuantRocket's user avatar
2 votes

Efficient integration of tick data feed with signal generation

I've used both approaches at different points of my career, and both are valid. Firstly, there's a few statements that aren't quite correct. ...AND in a file on disk in order to avoid losing all data ...
madilyn's user avatar
  • 5,240
2 votes

Close and Adjusted Close in Interactive Brokers API and Yahoo Finance

On the page you link: TRADES data is adjusted for splits, but not dividends ADJUSTED_LAST data is adjusted for splits and dividends. Requires TWS 967+. So to get adjusted close, request ...
Brian from QuantRocket's user avatar
2 votes

Are there any integrated framework that I can back-test and paper/live trading in one place?

Edit (2016-06-21): Now with live data/trading integration with Interactive Brokers. It has taken a while but it has finally arrived. backtrader (https://github....
mementum's user avatar
  • 628
2 votes

Send TRAIL STOP order when price hits a certain level, with IB TWS

You would create an "Alert" in TWS that submits the trailing order when some set of market conditions are met. It's confusing because this is really a trigger, but IB calls it an alert. ...
Sam Thomsen's user avatar
2 votes

What exactly is a contract's "trading class"?

For options, it is all of the same type of option for a particular underlying. For the e-minis, you are referring, all the calls where the underlying is e-minis is a class. Similarly for all the ...
AlRacoon's user avatar
  • 6,492
2 votes

Whats the need of Executing brokers if Prime brokers are the protagonist?

In other words, is it too costly for PB to be an EB as well? Answering your second question first, PB's are EB's; they just provide an entire suite of products and services beyond just trade ...
amdopt's user avatar
  • 4,338
1 vote

how to calculate/retrieve the number of sell orders (and buys orders as well) to detect iceberg orders

A short answer is to use reliable market data and a trading platform which doesn't wrap precious details in the market data into candles. Your algorithm is a reasonable, but is an approximation. A ...
Serg's user avatar
  • 1,022
1 vote

Interactive Brokers: Is Flex Web Service with Paper Account possible?

I also addressed this issue in forums and with the support. Outcome: Flex reports are not available for paper accounts.
Mikkel's user avatar
  • 111
1 vote

How to hedge PLN account on Interactive Brokers

Err, if its cash, then you can hedge your exposure to USD by selling USD in the spot market for PLN. That's called "sweeping" your PnL back to your base currency. To be efficient, you'll have to do ...
ThatDataGuy's user avatar
1 vote
Accepted

Keep Saved IB Historical Data Accurately Adjusted

Actually, because IB has TRADES - data adjusted for splits but not dividends, and ADJUSTED_LAST - data adjusted for splits and dividends I can check what I have saved from earlier that day or the ...
The AI Architect's user avatar
1 vote

Interactive Brokers - Tracking High Relative Trading Volume

You can use in IB market scanner, hot contracts by volume - you have this also in the api. today'sVolume/avgDailyVolume is highest - for hot contracts by volume avgDailyVolume is a 30-day ...
Andrei Ciuca's user avatar
1 vote

Why does my ibpy connection always close automatically

Because your python script ends and with it the socket that ibpy has opened to connect to TWS. The demo samples in the sources of ...
mementum's user avatar
  • 628
1 vote
Accepted

Extracting IB market data: bid and ask for greeks and IV

It depends on what are you going to use the IV for. Are you selling or buying? If doing both, taking volume/quote into account is sensible Extrapolate if doing only bid or only ask curve For deep ITM/...
adam's user avatar
  • 539
1 vote

Making an IB contract: Directory for IBpY exchanges and commodity codes?

IB has a search portal where you can look up contracts: https://pennies.interactivebrokers.com/cstools/contract_info/v3.9/index.php
Brian from QuantRocket's user avatar
1 vote

How to request intra day real time option data using ibPY?

Interactive Brokers posted a webinar on Dec 13 2016 about using IBridgePy to connect to IB's API. https://www.youtube.com/watch?v=hogXB07OJ_I. It is pretty easy to request real time price of option ...
hui's user avatar
  • 39
1 vote

What is the best way to connect R with IB?

IBrokers does support orders: see ?twsOrder and ?placeOrder.
Enrico Schumann's user avatar
1 vote

Changing timezones with historic forex data (Interactive Brokers API IBPy)

The time zone of returned bars is the time zone chosen in TWS on the login screen. https://interactivebrokers.github.io/tws-api/historical_bars.html
David Toth's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible