9

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 Interactive Brokers API is not suitable for high frequency trading execution. However the main reason that this is the case is not necessarily what would come to mind ...


7

The demo account sends simulated data, not delayed data. It is unusable for just about anything except to see if your connections are working. The paper account sends real time data if you subscribe to it and pay data fees. It has all the functionality of a real account except fills are simulated. I believe it's worst case fills as in you have to trade ...


7

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, which I maintain, has a function flex_web_service, which allows you to download queries. In R, you could write: library("IButils") flex_web_service(file = "~/my_files/my_report.csv", ...


6

The IB website have a demo version of TWS for download which you can use with their C++, Java etc API. The price feed is stale and orders are not cleared but it shouldn't matter for your purposes. The demo version doesn't require a account/username. There are also active groups which can be very helpful for details on IB API. One large group is, for ...


4

Data over IB's API is not real time. You can't even match up bid, asks, and lasts with their appropriate sizes. It's actually a 200 ms snapshot. For more reliable data go with B-PIPE, DTN or eSignal (they all have APIs) and a high speed co-located Ethernet or T1 connection to your vendor. Lots of additional coding is required.


4

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 and protect your profits if the price rises. Adjustable stop orders are not orders per say but they are "instructions" to change an existing order. For example: ...


4

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.


4

The function reqHistoricalData has an argument useRTH ("use regular trading hours"). Set useRTH = "0" to get data outside those hours. This can only work for the futures, not for the index, which is only computed during normal trading hours. library("IBrokers") tws <- twsConnect() contract <- twsContract(local = "ESH9", ...


3

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, are all based on assumptions. These assumptions are educated guesses at best, but more often terrible models are used (you always get filled at at mid!) and ...


3

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/wisentgenus#code IB has limitations when requesting historical data: Making identical historical data requests within 15 seconds. Making six or more historical ...


3

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 like from the [ibPy documentation example] (https://code.google.com/p/ibpy/wiki/IbPyOptional) and how the Java IB API is defined, you want to call tws.register(...


3

Some time ago I tested the IB C++ API with the free demo account: edemo-demouser. The market data is obviously far from reality, but its fine for getting to know the API itself. Good luck with your project!


3

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, though not streaming. But pricing is such that it is clear they only want to cater to institutions. Btw, with a $30K budget you can probably become a Tier1 quote ...


3

TradeStation offers python support via their WebAPI. Check it out here: http://tradestation.github.io/webapi-docs/


3

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 recent years. If you like the feel of IbPy, ibpythonic is near drop-in replacement for IbPy that works with Python 3 and the newer versions of IB's API. It's ...


3

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. If you are looking to automate the log-in/log-out process check out this GitHub repo. Be aware though that automated log in will not be possible if you have a ...


3

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, and currency, but hypothetically because of some corporate action it has a different multiplier. They can be looked up in IB's symbol database. List of E-Mini S&...


3

Try changing LocalSymbol to tradingClass and changing Last..Month to last..Month: fut_contract = Contract() fut_contract.symbol = 'MNQU0' #MNQ SEP'20 fut_contract.secType = 'FUT' fut_contract.exchange = 'GLOBEX' fut_contract.currency = 'USD' fut_contract.tradingClass = 'MNQ' fut_contract.lastTradeDateOrContractMonth = '202009' #Request Market Data app....


3

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 types of, well, execution - equities, bonds, futures, etc. They may further specialize in high touch (sales trader) working orders, providing algorithms (CS AES ...


2

I know of no broker that provides an official, supported Python API. If you are at Interactive Brokers you can consider using their FIX gateway, but that comes with additional cost. QuickFix provides a Python API.


2

Don't try to capture LIVE tick data using a WebApp. I'm not saying it can't be done, I'm just saying you would get zero benefits and you would have to work way harder to make it functional. Web servers are designed with a premise, serve the user the requested data as fast as possible and free that resource up. You would have to fight the server logic (as ...


2

At AlgoTrader we also use Esper to store all arriving Tick Data in a local Esper Named Window. After a predefined interval, the latest Tick Data snapshot is written to both the filesystem and the database. The actual persistence is done in a separate thread by using Esper Threading. Currently we use MySql but you could just as well use some NoSQL Database (...


2

You can fund the account with the minimum account requirement for setup, then withdraw your funds immediately. You will then only need enough in your account to cover monthly data usage fees. (You don't have to maintain an account minimum to keep the account open.) It's not an ideal solution but you may be able to borrow the funds off a family member for a ...


2

Don't use either DDE or ActiveX, go with the excel RTD server api. It's the basis behind the Bloomberg BDP plugin and we use it at work to push real time data to many spreadsheets.. It's now the recommended way to push data into a spreadsheet and it has a built in refresh rate parameter which can be any millisecond interval, or immediate if you want data ...


2

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.org/web/views/Finance.html


2

ES is supposed to update every 100 msec now in TWS. I imagine the FOPs update slower than that, probably every 300 msec. IB is not a real time feed like others, they aggregate the data and send it on schedule. It's good because it doesn't lag, bad because you don't get every tick. What Matt said is true and good but if you want to stick with Excel you ...


2

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 is set. When I download IB Gateway from the IB US website the provided default jts.ini file contains: [communication] peer=gw1.ibllc.com:4000 Depending on ...


2

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

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"


2

You would create an "Alert" 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.


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