Skip to main content
qi.q is a package manager for q. It can be fetched with: Linux / Mac:
Windows:
or by copying from alphakdb.com/qi.q.

Loading qi packages

To load a package, use .qi.import:
You can also specify the name of a package at the command line:
A full list of packages may be found here.

Feed handlers

The first time you try to run a feed handler on any given machine, it will likely complain
due to missing environment variables and/or dependencies. If it fails, qi will create a profile file at ~/.qi/qi.profile and suggest an alias qi, which will allow the feed handler to run smoothly the next time around. This extra step should only be required once per machine. With a feed running, the function tcounts[] shows the count of each table. If you run into issues with Github rate limiting, see here.

Other feeds

Some feeds require an account (free) and an API key. The following examples will use the qi alias instead of q qi.q.
For information on how to configure keys, see here.

Using stacks

q processes usually work together as a stack. The tickerplant (tp) is a router that takes data from feeds, and manages subscriptions. To start a tp as part of a stack, run:
The 1 (or any suffix) tells qi that this is a process that lives in a stack. Because no stack has been created, qi will create an example stack dev1, and will place a JSON configuration file in a stacks folder in the current working directory. Other useful commands:
When a feed handler is started in process mode (e.g. binance1), it publishes updates to its assigned tickerplant instead of accumulating data locally.

Hub

The hub process provides a view of all other processes:
The hub contains a procs table that lists the various processes. From within the hub, you can control processes and stacks:
Other useful hub functions:

License

qi.q and its packages are free to use, and distributed under the MIT license.

Questions & Feedback