I would like to calculate a check sum of a FIX message I processes using .Q.fs Does anyone have a suitable efficient implementation in q? http://www.onixs.biz/fix-dictionary/4.2/app\_b.html Dave
this might be fast enough
x:“my fix message|delim|A|116|444|”
ssr[;1#" ";1#“0”]@-3$string sum[4h$x]mod 256
“062”
it’ll need testing to check it agrees with the sample c code.
shorter
q)“000”|-3$string sum[4h$x]mod 256
Thanks.
Thanks much neater than I had.
D
“0”^-3$string summod 256
Hi All,
Thank you for the assistance.
Especially this was helpful to know:
4h$“01ABCabc”
To help with FIX capture I would like to also capture messages in realtime from a trading API I am connecting with to monitor transaction costs and other information.
Does anyone have any suggestions on how this can be achieved easily. I have a working FIX engine written in JAVA that I have previously built. Should I set up a standard Ticker plant system, and use this?
D
google for |kdb fix| found aquaq’s (reputable) FIX code on github and this article:
http://www.firstderivatives.com/downloads/q_for_Gods_Jan_2014.pdf
it’s hard to say if you should use your java system. if you have specific tasks as you suggest, maybe you can code each task in q and see how it feels in kdb+. that exercise will tell you if you have the time to write the FIX messaging or if you need to use what you have and concentrate on what you need to do in kdb+
until you know you need a ticker feed, real time database, historical database.. just have some fun writing a program that dumps a report every hour or something (http://code.kx.com/wiki/Reference/dotzdotts shows how to do something regularly).
i’m assuming too much, though - but maybe there’s a pointer or two in there.
I will look this through in evening
Again thank you
D
Hi,
I looked through this and found a lot. https://github.com/AquaQAnalytics/kdb-fix-adaptor
This did what I wanted but had problems getting compiled and running at start.
I will us this option for now though.
Thank you all for the help
D