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

MetaData Initialization

Allowed instruments types are given in "Instrument Types" section of meta_enumerations.md.

Data Initialization for Instrument Type(s)

from trade_database_manager.manager import MetadataSql

metadatalib = MetadataSql()
metadatalib.initialize(for_inst_types="CB")

This will try to create two tables, instruments and instruments_cb in the database if not yet exists. The instruments table will store the common information of all instruments, and the instruments_cb table will store the type-specific information of the instruments of type CB.

The table fields are listed in the data_organization.md file.

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.1.4.tar.gz (44.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

trade_database_manager-0.1.4-py3-none-any.whl (36.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: trade_database_manager-0.1.4.tar.gz
  • Upload date:
  • Size: 44.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for trade_database_manager-0.1.4.tar.gz
Algorithm Hash digest
SHA256 c4fa8a0e98608c33c1d1db6b770c19b12c50c3521a50ee101cdc3010eaac3186
MD5 b3bb3aad1c7e4768e0db3dfc514a3c8c
BLAKE2b-256 3f60553ed78639ac0abf9395b531562f7ad481fbd85562f2ffe35139fe031908

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for trade_database_manager-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6864380e182e2eea34f1b1b195af8092fb4e0d8f2084ec37faa4bc7e3f50c946
MD5 b712fc06abdb34121d920d9f96f33bf4
BLAKE2b-256 995e511d6062d334b9948bc513af87773c76548b9fa8c2b7a81db1ca3b216aee

See more details on using hashes here.

Supported by

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