Skip to content
Q wrapper for the Interactive Brokers API
Branch: master
Clone or download
Latest commit b94b134 Jan 14, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
test Added more callbacks Jan 11, 2017
third_party Hack TWS bug: 509 - Exception caught while reading socket Jan 25, 2017
.editorconfig Rewrite project Nov 28, 2016
CMakeLists.txt Fix bug in mixed lists Jan 24, 2017

A Q wrapper for the Interactive Brokers API


mkdir build && cd build
cmake ..

Optionally, run cmake -G Xcode .. to generate an XCode project or cmake -G MSVC .. for Microsoft Visual Studio.

The program will build a 32-bit binary by default. To build a 64-bit, run cmake -DBUILD_x64 ... For cross compilation (compile 32-bit on a 64-bit system) you need a few extra packages. Please see Dockerfile for an example of how to do this on Linux.

NB: The program is only tested on MacOS and Ubuntu Linux.


Running the following command will dynamically link the QIB functions into the .ib namespace:

.ib:(`:bin/qib.0.0.1 2:(`LoadLibrary;1))`

The program must have the function .ib.onrecv defined which should take two arguments; function name and arguments, e.g.:

.ib.onrecv:{[fname;args] show (fname;args)};
See `app/ib.q` for a more complete example.

To upgrade the TWS API download the source files from and extract the Posix Client into `third_party/ib`:

cd third_party/ib tar -xvf twsapi_macunix.971.01.jar

# Class Reference



You can’t perform that action at this time.