Author name: ibridge

IBridgePy update on 7/13/2017

The IBridgePy has been updated on 7/13/2017. The major updates include: Fixed the bug of  KeyError: ‘last_price’ Updated data.current: The sequence of securities in the output pandas Series/DataFrame is same as the input sequence of securities, which is in line with Quantopian’s data.current Updated data.history: The sequence of securities in the output pandas Series/DataFrame/ panel […]

IBridgePy update on 7/13/2017 Read More »

Great News: Run Quantopian algorithms using IBridgePy

Dear IBridgePy users, We are very excited to tell everyone that IBridgePy can run Quantopian algorithms with NO or minimum changes. Many of you may have noticed that the IBridgePy documentation have  been updated with many functions that behave very similar to those functions bearing same names at Quantopian. The Quantopian algorithms using the following functions

Great News: Run Quantopian algorithms using IBridgePy Read More »

How to retrieve the whole option chains from IB using IBridgePy?

As an example, the following code can be used to know the available futures of E-mini S&P 500. “xx” in the code represents the expiry of the futures. def initialize(context): request_data(contractDetails=[symbol(‘FUT,ES,USD,xx’)]) def handle_data(context, data): print data.data[symbol(‘FUT,ES,USD,xx’)].contractDetails exit() Another example is provided to get the option chains of E-mini S&P 500 futures. “xx,xx,xx,xx” in the code represents expiry,

How to retrieve the whole option chains from IB using IBridgePy? Read More »

Great News: IBridgePy on Python 3 is available !

Dear IBridgePy users, Thank you very much for your interest in IBridgePy. We are working very hard to make IBridgePy the easiest Python tool to trade with Interactive Brokers. As promised, we are delighted to announce that IBridgePy on Python 3 is available ! You can download it at www.IBridgePy.com/download and choose IBridgePy_python3_64bit Please contact with

Great News: IBridgePy on Python 3 is available ! Read More »

Do you have any feature for scheduling? Which would be similar to Quantopian schedule_function?

No. The main products that quantopian trades are US equities and they have clear market open and close time. Therefore, quantopian provides schedule_function either before market opens or after market closes. In IBridgePy, you can trade any securities or commodities that IB supports and they may have totally different trading hours. The solution is to

Do you have any feature for scheduling? Which would be similar to Quantopian schedule_function? Read More »

Example of requesting historical data

request_data request_data(historyData= None, realTimePrice = None, contractDetails= None, marketSnapShot=None, waitForFeedbackinSeconds=30,repeat=3) historyData: a list of requests of historical data. Each request is defined by a tuple with three elements, security, timeframe, goBack. IB supports the following timeframes: 1 sec, 5 secs, 15 secs, 30 secs, 1 min, 2 mins, 3 mins, 5 mins, 15 mins, 30

Example of requesting historical data Read More »