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 ...
  • 1,142
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,...
6 votes

How to get historical data for expired futures contracts in IbPy?

After some research and reading the source, I found there is a field in the Contract class called: m_includeExpired. Set this to True and you can get data for expired contracts.
  • 211
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 ...
4 votes

Market data for options

Here is a list of vendors connected to OPRA directly who can supply such data. http://www.opradata.com/related_info/vendor_list.jsp Like yourself I looked at Xignite. They have a nice REST API, ...
  • 326
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 ...
4 votes
Accepted

After hours data - Interactive Brokers

The function reqHistoricalData has an argument useRTH ("use regular trading hours"). Set ...
4 votes
Accepted

Interactive Broker API error 321?

Try changing LocalSymbol to tradingClass and changing Last..Month to ...
  • 3,880
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, ...
3 votes
Accepted

How to get positions of your portfolio from Interactive Brokers with python IBPy?

The IB API calls your code asynchronously when there are account updates after you have called reqAccountUpdates. But you have to provide a callback function (handler) for the IB API to call. Looks ...
  • 76
3 votes
Accepted

Downloading Data from Interactive Brokers using IbPy

You'll want to adjust the contract inputs you're sending to IB secType should be CASH, exchange should be IDEALPRO, and add in whatToShow = "MIDPOINT" or "BID" or "ASK"
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 ...
  • 51
3 votes

Aggregate interactive brokers data in matlab

Here is a pure Java library with Matlab examples for getting daily and minute aggregated bars. It is based on IB Java API. I wrapped it to have a simple interface: http://www.spreadvectors.com/...
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. ...
  • 3,880
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, ...
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 ...
  • 444
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 ...
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.
2 votes

InteractiveBrokers server outage every Saturday

Answer to question of IB Gateway using other server IB Gateway reads a "jts.ini" file to determine which server it should connect to. There is a "[communication]" section under which a "peer=" value ...
  • 76
2 votes

IB with R which package?

You'll want the ibrokers package, its very good and built on the c++ api. Also check out quantmod, performanceanalytics, and highfrequency package. And a comprehensive list, http://cran.r-project....
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. ...
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....
  • 618
2 votes
Accepted

IbPy download historical price data

Just checked in my python script for daily futures data from Interactive Brokers. Maybe it will be useful for you: https://github.com/busygin/ib_data_loader
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 ...
  • 5,081
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 ...
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 ...
  • 5,452
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 ...
  • 3,880
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 ...
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
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 ...
  • 39

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