Skip to main content

A wrapper of kdb and sql for convenient trade data management.

Project description

*** IMPORTANT NOTICE ***

This package is not in a usable stage. It is only uploaded for convenience of developing and testing.

Postgreslq Initialization

CREATE DATABASE trade_data;
CREATE USER tradedbadmin WITH PASSWORD 'trade_password';
GRANT ALL PRIVILEGES ON DATABASE trade_data TO tradedbadmin;
\connect trade_data;
GRANT ALL ON SCHEMA public TO tradedbadmin;

Add the following lines in the pg_hba.conf file to allow password authentication for the tradedbadmin role.

# trade database
host    all            tradedbadmin     0.0.0.0/0               scram-sha-256
host    all            tradedbadmin     ::/0                    scram-sha-256

KDB+ Initialization

get license

Request a 64-bit license from Kx Systems. Fill the form then the system will send an email with the license file and a base64 key (Either can be used to license the product).

Server side (Linux system)

  1. Put the executable q and license in desired folder, say /opt/l64 directory.
  2. Create a folder to store the data, say /opt/data directory.
  3. Set the environment variable QLIC to the directory where the license file is stored. And QHOME to the data directory.
  4. Run the q executable with the following command:
    $ q -p 5000 -s 1 -w 100 -t 1000 -T 1000 -U /opt/l64/trade.q
    
    • -p 5000: This sets the port number for the kdb+ process. In this case, the port number is 5000.

    • -s 1: This sets the number of secondary threads. In this case, it's set to 1.

    • -w 100: This sets the workspace heap size. In this case, it's set to 100 MB.

    • -t 1000: This sets the timer interval in milliseconds. In this case, it's set to 1000 milliseconds, or 1 second.

    • -T 1000: This sets the timeout in seconds for client queries. In this case, it's set to 1000 seconds.

    • -U /opt/l64/trade.q: This sets the access control list file. In this case, the file is located at /opt/l64/trade.q. This file contains a list of usernames and passwords for clients that are allowed to connect to the kdb+ process.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trade_database_manager-0.0.3.tar.gz (24.7 kB view details)

Uploaded Source

Built Distribution

trade_database_manager-0.0.3-py3-none-any.whl (26.5 kB view details)

Uploaded Python 3

File details

Details for the file trade_database_manager-0.0.3.tar.gz.

File metadata

File hashes

Hashes for trade_database_manager-0.0.3.tar.gz
Algorithm Hash digest
SHA256 faaa92bbdb86723fd91ec12a9f775fc25e87bb395bb2334beaf42940e5713b4f
MD5 608e3a61005321b7224c9e45239bfeb3
BLAKE2b-256 4a80086b51b9e6de2dc35cb623d150564a07abc5dd593f8d2a3f802035fdf555

See more details on using hashes here.

File details

Details for the file trade_database_manager-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for trade_database_manager-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8e6cf526cc7c4447ab82e44e70d651620a378c6ecb332302ed2d9b8f8145546c
MD5 1d1a5314ccac1a9d57fc21ef03c010ac
BLAKE2b-256 b8a758f3be4bbd500f00fada48381652af00334658310aa91e1174794f437112

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page