Java - Demo projects

These are examples with Java Connector SDK library (the Java 11 version is used in these examples).

These projects are exported as multiple .jar's. These projects use the extension-connector SDK to connect to the QST WebSocket API.

How to run the example .jar’s

The following steps are necessary to be able to run the .jar's

1. Enable the Extensions API

It can be enabled in the application Properties (Ctrl + P) or General -> Properties

../_images/enable-extensions-api.png

2. Install the correct java version for the extension

These demo jar’s are using Java 11, the latest long term supported Java version.

You will have to install Java 11 or a newer version.

3. Setting the JAVA_HOME variable [Optional]

When the Extension API frame is opened the initial Java version is set from the JAVA_HOME variable from the Operating System.

In the case of Oracle Java 11.0.5 the path looks like this on Windows 10:

../_images/java-home.png

4. Choosing the correct java version in the Extension frame

In the Extension frame the currently selected java version is displayed after the Start in field.

Setting Java version

Setting Java version

5. Choosing the extension

The source code is included.

The source code can be inspected with any IDE or text editor but it can’t be run only from the Extension API frame.

Examples

A more general demo implementation

  1. ExtensionDemo.jar this extension supports all the request. After you launch the extension a help will appear on how to use it. If you want to check the help for a particular request, you can just write in the input zone, the name of the request.

    Running in the Extension API frame:

    Extension demo

    Extension demo

Demo with a single purpose

1. Order Entry Events

OrderEntryEventsDemo.jar this will only display the order entry events. It will send a request to the server the receive the Order Entry events.

../_images/OrderEntryDemo.png

2. Get Orders

OrdersDemo.jar to get the orders for a given account. To get the data, QST has to be connected to the provider.

../_images/ordersDemo.png

3. Place Order

PlaceOrderDemo.jar demo for placing an order.

../_images/placeOrderDemo.png

4. Register Book

RegisterBookDemo.jar getting the book data and registering for updates.

../_images/registerBookDemo.png

5. Snapshot

SnapshotDemo.jar it will displays a snapshot for a specified Contract

../_images/snapshotDemo.png