blockspacer / kdbLearn

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

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


Languages

Language:C++ 72.3%Language:C 11.3%Language:Jupyter Notebook 9.4%Language:Python 3.7%Language:q 2.9%Language:HiveQL 0.3%Language:Makefile 0.1%