安裝IBKR python API

IB官網下載最新API,選Software: TWS API,然後”I Agree” License aggreement。然後選平台,比如TWS API Latest for Mac / Unix。

https://www.interactivebrokers.com/en/index.php?f=5041

cd 到下載地址。

unzip twsapi_macunix.985.02.zip

根據README.md里說的

python3 setup.py sdist
python3 setup.py bdist_wheel
python3 -m pip install  --upgrade dist/ibapi-9.85.2-py3-none-any.whl

具體版本可能有點不一樣。我安裝的時候README.md里的版本有點過時,不是下載的現有版本。

安裝完成後就可以讀User’s Guide了。

Leave a Comment

Your email address will not be published.