A friend of mine recently started using Interactive Brokers through Python on Linux, and referenced the installation guide in my previous note. He wrote a much better, clearer set of instructions. Python is a really good language to code in and Linux is easier to work in and has less overhead processes than Windows.
percent sign (%) lines are comments, other lines are to be entered in a terminal.
%---
%1. Run Ubuntu 9.10 Installer
%---
%---
%2. Update ubuntu 9.10 with the latest everything
%---
sudo apt-get update
%there were 159 MB of updates on 12-17-2009
% If you have any problems while running the update, run this to resume the
% update (important if you are downloading a few hundred MB of updates).
sudo dpkg --configure -a
%install flash
sudo apt-get install flashplugin-nonfree
%---
%3. Download trader workstation
%---
%URL:
%http://interactivebrokers.com/en/control/systemstandalone.php?os=unix&ib_entity=llc
%
% Or you can just run the following command
%
sudo wget http://www.interactivebrokers.com/download/unixmacosx.jar
%run this in your home dir or your downloads dir and it will download the file
%---
%4.Install Python, using the following commands
%---
sudo apt-get build-dep python-numpy python python-scipy python-gtk2
python-imaging ipython
%this is about 326 MB as of 12-17-2009
sudo apt-get install python-numpy python-profiler python-gtk2
python-scipy python-matplotlib python-matplotlib-doc ipython pychecker
pylint pyflakes python-doc python-examples python-imaging
python-scientific python-serial python-docutils python-glade2
%this is about 80 MB as of 12-17-2009
%---
%5.Install and Configure Java and then Install and Configure Trader
Workstation (TWS)
%---
%install the java runtime using the following commands:
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
%install the Java Dev Kit will give you the jar command necessary to install TWS
sudo apt-get install sun-java6-jdk
%test the java installation with this command
java -version
%make a directory for IB TWS
mkdir /home/YOUR_USERNAME/IBJts
%move the IB download from the download directory to the home directory
cp ./unixmaxosx.jar /home/YOUR_USERNAME/
%extract the TWS files
jar xf unixmacosx.jar
%install TWS
java -cp jts.jar:pluginsupport.jar:riskfeed.jar:hsqldb.jar:jcommon-1.0.12.jar:jfreechart-1.0.9.jar:jhall.jar:other.jar:rss.jar
-Xmx256M jclient.LoginFrame .
%---
%6.Install IBpy
%---
%download ibpy wget IbPy-0.7.6-9.51 (current as of writing 12-17-2009)
wget http://ibpy.googlecode.com/files/IbPy-0.7.6-9.51.tar.gz
%extract
tar xzf IbPy-0.7.6-9.51.tar.gz
%go to the directory
cd IbPy-0.7.6-9.51
%setup
sudo python setup.py install
%run TWS
java -cp jts.jar:pluginsupport.jar:riskfeed.jar:hsqldb.jar:jcommon-1.0.12.jar:jfreechart-1.0.9.jar:jhall.jar:other.jar:rss.jar
-Xmx256M jclient.LoginFrame .
%run IBpy demo
python IbPy-0.7.6-9.51/demo/example_opt
2 comments:
I thought you might post it.
%to create a shortcut to IB TWS on your ubuntu desktop, I wrote a bash script that changed the directories and ran the TWS command.
%Then I linked to the bash script with an ubuntu launcher.
%my bash script is as follows:
%#filename: ibtws.sh
cd ..
cd IBJts
java -cp jts.jar:pluginsupport.jar:riskfeed.jar:hsqldb.jar:jcommon-1.0.12.jar:jfreechart-1.0.9.jar:jhall.jar:other.jar:rss.jar
-Xmx256M jclient.LoginFrame .
%I then right click on the desktop, create a launcher, and in the command box:
bash ibtws.sh
Thanks, Max.
Post a Comment