Quant Trading Live Report

Interactive Brokers API Python demo with working package


Listen Later

Interactive Brokers API Python demo with working package
 
I am still frustrated by the low level Python support for Interactive Brokers. Check out these current options
https://www.reddit.com/r/algotrading/comments/65k22v/interactive_brokers_972_has_native_python_api/comments:
 
I find none of these 3rd party options are very good. They are not intuitive with weak tutorials. Also remember that these Python packages can be abandoned like ibPy. That is not a good future. Also I found the current native Interactive Brokers native API Python support is low level which means a lot of work. I recorded this for my Facebook Live:
The includes a comment of the API still too slow.
Note that there is $20US/month fee for accounts $2k, you will have access to all market data for free. This is for individual accounts so there are different fees for advisor accounts.
More criticisms
https://www.reddit.com/r/algotrading/comments/65k22v/interactive_brokers_972_has_native_python_api/
I find my course in the Elite is most predictable since I can use Redis as the message queue between my Python scripts with a Java listeners for the orders. This seems to works ok as described in my course of
Python C++ Algo Indie Trading Business Course Futures Options Algos
 
https://quantlabs.net/academy/introduction-quant-elite-membership/
One the positive side, the IB Trader Workstation (TWS) software has not changed in any way to support API calls.
To circumvent the data problem if you go with Interactive Brokers without the required funding level, i am revisiting IQFeed for MacOS or Linux market data.
UPDATE: I just found setting up IQFeed for either Windows or Mac was not going to work. My Python scripts appear not to work on Windows since some of the required packages could not install with PIP. I also found trying to get IQFeed working on Mac or Linux was too much of a hassle. So, my only other working option for now was with Oanda. I already have a live account  so I  replicated what I have, I would recommend the following instructions from :
https://quantlabs.net/blog/2018/07/working-oanda-v2-api-tips-to-work-with-python/
Once you have your LIVE Oanda account setup with the required account id and token, you should be able to get running from within Python using these Python package instructions.
https://github.com/hootnot/oanda-api-v20
The only working example I care about for data is found under'
Processing series of requests
I can confirm this work with the V20 version. I only care about streaming data so this appears to work to exactly the same as live data. The only thing I require is pipe the orders to Interactive Brokers using Oanda data. I know this will be out of synch but this the best option I really have on a non Windows environment like Mac or Linux.
TBH i am finding it weird I have Oanda working just fine. I hate this broker but on the other hand to work IB is a pain unless you have data. The difference between Oanda and IB data will not work as thought here. The difference between let's say EUR USD is quite vast between the 2 brokers as in my original strategy of using Oanda/IQFeed data to execute orders through IB. This  could be unprofitable as the difference is quite big. Note that IQFeed forex data source is FXCM as well. 
 
GOOD UPDATES:
I tried this new Python package of ib_sync. It seems to work ok with both the main example and notebook examples. Order and data seems to work fine in demo/testing mode. So which way should it be? Oanda as explained or above use this ib_sync package?
https://github.com/erdewit/ib_insync
 
More details via this video
https://youtu.be/q2cKytVwCyY
...more
View all episodesView all episodes
Download on the App Store

Quant Trading Live ReportBy QuantLabs.net

  • 2.5
  • 2.5
  • 2.5
  • 2.5
  • 2.5

2.5

6 ratings