Skip to content

Commit a3235c3

Browse files
authored
Update to ibapi 10.16.01 (#65)
* Progress towards using DHaaL * Trying to build whl files * Trying to build whl files * Working to fix sphinx * Working to fix sphinx and build * Working to fix sphinx and build * Working to fix sphinx and build * Working to fix sphinx and build * Working to fix sphinx and build * Working to fix sphinx and build * Working to fix sphinx and build * Working to fix sphinx and build * Working to fix sphinx and build * Working to fix sphinx and build * Working to fix sphinx and build * Working to fix sphinx and build * Working to fix sphinx and build * Working to fix sphinx and build * Working to fix sphinx and build * Working to fix sphinx and build * Working to fix sphinx and build * Working to fix sphinx and build * Working to fix sphinx and build * Working to fix sphinx and build * Working to fix sphinx and build * Working to fix sphinx and build * Working to fix sphinx and build * Added docker builds * Added docker builds * Added docker builds * Added docker builds * Added docker builds * Added docker builds * Added docker builds * Added docker builds * Added docker builds * Added docker builds * Added docker builds * Added docker builds * Added docker builds * Added docker builds * added deephaven_server to docs. * Refactored local docker. * Updated documentation. * Updated documentation. * Updated documentation. * Renamed the wheel version number for dev branches to make twine happy. * Set pypi publishing credential. * Updated readme with run instructions * Updated readme with better run instructions * Updated readme * Fixed readme bugs * Fixed docs on port exposure * Handle blocking contract error conditions properly. * Better error reporting on contract details problems. * Fixed example code. * Use the latest ibapi module * Trigger a build * Fix docker build * Fix docker build * Fix docker build * Fix docker build * Update docs.
1 parent 89d15da commit a3235c3

File tree

3 files changed

+32
-13
lines changed

3 files changed

+32
-13
lines changed

.github/workflows/Dockerfile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
11

22
FROM ubuntu:22.04
33

4+
ARG IB_VERSION
5+
46
RUN apt update && \
5-
apt install -y openjdk-11-jdk python3-pip
7+
apt install -y openjdk-11-jdk python3-pip curl zip
68

79
ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/
810

11+
RUN mkdir /build && \
12+
cd /build && \
13+
curl -o ./api.zip "https://interactivebrokers.github.io/downloads/twsapi_macunix.${IB_VERSION}.zip" && \
14+
unzip api.zip && \
15+
cd ./IBJts/source/pythonclient && \
16+
python3 setup.py install && \
17+
cd / && \
18+
rm -rf /build
19+
920
COPY ./wheels /wheels
1021

1122
RUN pip3 install /wheels/*.whl && \

.github/workflows/build-and-publish.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
branches:
99
- main
1010

11+
env:
12+
IB_VERSION: 1016.01
13+
1114
jobs:
1215
build-whl:
1316
name: Build WHL
@@ -155,5 +158,6 @@ jobs:
155158
push: true
156159
tags: ${{ steps.meta-base.outputs.tags }}
157160
labels: ${{ steps.meta-base.outputs.labels }}
161+
build-args: IB_VERSION=${{ env.IB_VERSION }}
158162
env:
159163
IMAGE_NAME: ${{ github.repository }}

README.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,6 @@ To setup and configure the system:
154154

155155
1) Follow the [Deephaven Quick Start Guide](https://deephaven.io/core/docs/tutorials/quickstart/) to get [Deephaven](https://deephaven.io) running.
156156
1) Follow the [TWS Installation Instructions](https://www.interactivebrokers.com/en/trading/tws.php) to get [IB Trader Workstation (TWS)](https://www.interactivebrokers.com/en/trading/tws.php) running.
157-
1) Check out the [deephaven-ib](https://github.com/deephaven-examples/deephaven-ib) repository:
158-
```bash
159-
git clone https://github.com/deephaven-examples/deephaven-ib.git
160-
cd deephaven-ib
161-
```
162157
1) Launch [IB Trader Workstation (TWS)](https://www.interactivebrokers.com/en/trading/tws.php).
163158
1) In [IB Trader Workstation (TWS)](https://www.interactivebrokers.com/en/trading/tws.php), click on the gear in the
164159
upper right corner. ![](docs/assets/config-gear.png)
@@ -222,31 +217,39 @@ This is the most tested way to launch.
222217

223218
### Launch with a local installation (No Docker)
224219

225-
> **_NOTE:_** Deephaven pip install does not yet supported on all architectures. This launch should work on Linux (AMD64 and ARM64) and Windows WSL. It is not yet supported on Windows without WSL or Mac. For these architectures, you should use the Docker installation. As soon as Deephaven supports these architectures for pip, [deephaven-ib](https://github.com/deephaven-examples/deephaven-ib) will work.
220+
> **_NOTE:_** Deephaven pip install is not yet supported on all architectures. This launch should work on Linux (AMD64 and ARM64) and Windows WSL. It is not yet supported on Windows without WSL or Mac. For these architectures, you should use the Docker installation. As soon as Deephaven supports these architectures for pip, [deephaven-ib](https://github.com/deephaven-examples/deephaven-ib) will work.
226221

227222
It is possible to use [deephaven-ib](https://github.com/deephaven-examples/deephaven-ib) without docker, but this is a
228223
new feature and has not been well tested. To do this:
229224
1) Launch [IB Trader Workstation (TWS)](https://www.interactivebrokers.com/en/trading/tws.php).
230225
2) Accept incoming connections to [IB Trader Workstation (TWS)](https://www.interactivebrokers.com/en/trading/tws.php). (May not be required for all sessions.)
231226
![](docs/assets/allow-connections.png)
232-
3) Install [deephaven-ib](https://github.com/deephaven-examples/deephaven-ib):
227+
3) Install `ibapi`:
228+
```bash
229+
# pip installed version of ibapi is too old. You must download and install a more recent version.
230+
curl -o ./api.zip "https://interactivebrokers.github.io/downloads/twsapi_macunix.1016.01.zip"
231+
unzip api.zip
232+
cd ./IBJts/source/pythonclient
233+
python3 setup.py install
234+
```
235+
4) Install [deephaven-ib](https://github.com/deephaven-examples/deephaven-ib):
233236
```bash
234237
pip3 install deephaven-ib
235238
```
236-
4) Install Java 11 and set the appropriate `JAVA_HOME` environment variable.
237-
5) Launch the system (Option 1):
239+
5) Install Java 11 and set the appropriate `JAVA_HOME` environment variable.
240+
6) Launch the system (Option 1):
238241
```bash
239242
# Set jvm_args to the desired JVM memory for Deephaven
240243
python3 -i -c "from deephaven_server import Server; _server = Server(port=10000, jvm_args=['-Xmx4g']); _server.start()"
241244
```
242-
6) Launch the system and execute a custom script (Option 2):
245+
7) Launch the system and execute a custom script (Option 2):
243246
```bash
244247
# your_script.py must begin with: "from deephaven_server import Server; _server = Server(port=10000, jvm_args=['-Xmx4g']); _server.start()"
245248
# Set jvm_args to the desired JVM memory for Deephaven
246249
python3 -i /data/your_script.py
247250
```
248-
7) Launch the [Deephaven IDE](https://github.com/deephaven/deephaven-core/blob/main/README.md#run-deephaven-ide) by navigating to [http://localhost:10000/ide/](http://localhost:10000/ide/) in a browser.
249-
8) Use `host=localhost` for the hostname in the examples
251+
8) Launch the [Deephaven IDE](https://github.com/deephaven/deephaven-core/blob/main/README.md#run-deephaven-ide) by navigating to [http://localhost:10000/ide/](http://localhost:10000/ide/) in a browser.
252+
9) Use `host=localhost` for the hostname in the examples
250253

251254
# Use deephaven-ib
252255

@@ -632,3 +635,4 @@ If you can not solve your problems through either the `errors` table or through
632635
# Examples
633636
634637
Examples can be found in [./examples](./examples).
638+

0 commit comments

Comments
 (0)