While there s no officially supported Python API, I ve been using ibpy successfully for months now, and it s quite easy. No need to concern oneself with java2python etc. All I had to do was clone ibpy somewhere:
git clone https://github.com/blampe/IbPy
从那里安装:
cd IbPy
python setup.py install
And voila是这样做的。 最初,我从
Once you ve got that installed, the interface in python is pretty much identical to the Java API interface: IB API pdf
I found it useful to look at the TWS Test Client Java code included with the IB API.
Edit:
IB has now had their own python API for a while, so not much more need for ibPy unless you re on python 2.