/kdbLearn

This repository imports JSON object (from UniBit API request) into kdb+ (via c++, pyq).

Primary LanguageC++

This repository imports JSON object (from UniBit API request) into kdb+ (via c++, pyq).

./q/l64/q -p 12345

cd UniBit

clear && printf '\e[3J'; rm UniBit; g++ -DKXVER=3 -o -std=c++11 -o UniBit include/internal/*.cpp UniBit.cpp c.o -lpthread -lboost_system -lcrypto -lssl -lcpprest; ./UniBit >> log.log

This imports 3598 US stocks into kdb+ and save as {ticker}.csv files. Implementation is single-thread and requires 130s (if there is no credit limit on API accounts) or at least within 5 mins.

Files can be found in quotes/{ticker}.csv

Log information can be checked via UniBit/log.log (intermittent logs).


Prerequisites

(1) install nlohmann/json.hpp and cpprest (Microsoft).

(2) Ubuntu (sudo apt install nlohmann-json3-dev libcpprest-dev) is recommended rather than Mac OSX (although it has brew install nlohmann_json cpprestsdk).

(3) Thanks codyfeng for a relatively complete Kdb interface.