到IB官網下載最新API,選Software: TWS API,然後”I Agree” License aggreement。然後選平台,比如TWS API Latest for Mac / Unix。
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了。