cancel
Showing results for 
Search instead for 
Did you mean: 

Starting tickerplant with kdb-tick

marrowgari
New Contributor
Hi all, thanks in advance for the help!

I cloned kdb-tick from here: https://github.com/KxSystems/kdb-tick

And I've been following tutorials from these sources:

http://code.kx.com/q/wp/building_real_time_tick_subscribers.pdf
http://code.kx.com/wiki/Startingkdbplus/tick
https://github.com/michaelwittig/java-q/wiki/Getting-started-with-kdb-tick

When I enter a q command to start the tickerplant it keeps throwing the same error (see below).
~/q/kdb-tick master*
ls
README
.md tick      tick.q


~/q/kdb-tick master*
q tick.q -p 5010
KDB
+ 3.5 2017.09.06 Copyright (C) 1993-2017 Kx Systems


Welcome to kdb+ 32bit edition
For support please see http://groups.google.com/d/forum/personal-kdbplus
Tutorials can be found at http://code.kx.com/wiki/Tutorials
To exit, type \\
To remove this startup msg, edit q.q
"kdb+tick 2.8 2014.03.12"
'tick/sym.q. OS reports: No such file or directory
  [2]  /Users/marrowgari/q/kdb-tick/tick.q:23: system"l tick/",(src:first .z.x,enlist"sym"),".q"
                                               ^
q))

I assume this has something to do with the sym.q schema located in the tick folder but I can't get it to work. I tried setting 2 tables (trade and quote) and putting them in a folder called sym in the tick folder but that obviously isn't the right approach. Any help on how this schema file should be created would be hugely appreciated. For reference, my trade and quote tables are listed below.

quote:([]time:`timespan$(); sym:`symbol$(); bid:`float$(); ask:`float$(); b size:`int$(); asize:`int$())
trade
:([]time:`timespan$(); sym:`symbol$(); price:`float$(); size:`int$())

Thanks again for the help and please let me know if you need any more information on my current setup.

2 REPLIES 2

jemma_borland
New Contributor
Hi, Your trade and quote schemas look fine. Can you clarify your directory structure for me? It should be: kdb-tick -> tick.q -> tick -> u.q -> r.q -> sym.q It sounds as though you have made a further directory inside tick to place your sym.q file in, which is unnecessary. Videos showing this type of setup with an enhanced tick functionality exist on GitHub, if this interests you. Hope this helps! Jemma

Thanks, Jemma. It was a simple fix. Just needed to store the trade and quote tables in the sym.q file directly. I had them in a separate folder called sym, which was throwing the error. Current set up now looks like

~/Documents/HappyClouds/Q/q/kdb-tick/tick master*
ls
r
.q   sym.q u.q

sym.q file contains the following...

quote:([]time:`timespan$();sym:`symbol$();bid:`float$();ask:`float$();bsize:`int$();asize:`int$())
trade
:([]time:`timespan$();sym:`symbol$();price:`float$();size:`int$())

I can now start the kdb-tick / q process with the following command...

~/Documents/HappyClouds/Q/q/kdb-tick master*
q tick.q -p 5010
KDB
+ 3.5 2017.09.06 Copyright (C) 1993-2017 Kx Systems
m32
/ 8()core 8192MB marrowgari matthews-mbp.fios-router.home 192.168.1.154 NONEXPIRE


Welcome to kdb+ 32bit edition
For support please see http://groups.google.com/d/forum/personal-kdbplus
Tutorials can be found at http://code.kx.com/wiki/Tutorials
To exit, type \\
To remove this startup msg, edit q.q
"kdb+tick 2.8 2014.03.12"
q
)

Thank you!