Skip to content

crackCodeLogn/twm-market-data-crdb-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📈 Tandem Workflow Manager - Market Data CockroachDB Service

📌 Overview

This service acts as the central handler for managing market-data and personal market transactions in a locally hosted CockroachDB instance. It provides RESTful APIs to perform various operations, including CRUD and complex compute support for market entities.

🗄️ Managed Tables

1️⃣ Market Data

  • 📅 Date – Stored in yyyyMMdd format
  • 🔖 Ticker – Includes stock exchange & country code
  • 💰 Close Price (or Adjusted Close Price)

2️⃣ Market Transactions

  • 🔢 Order ID (Primary Key)
  • 🔼 DirectionBUY / SELL
  • 🔖 Ticker – Includes stock exchange & country code
  • 🔄 Quantity Transacted
  • 💵 Transaction Price (Total Cost)
  • 💲 Price per Share
  • 📅 Transaction Date
  • 📆 Settlement Date
  • 🏷️ Ticker Name
  • 🏛️ Ticker Sector
  • 🏦 Account TypeTFSA 🇨🇦 / FHSA 🇨🇦 / Non-Registered 🇨🇦
  • 🔢 Account Number
  • 🏷️ CUSIP Number (Committee on Uniform Securities Identification Procedures)
  • ⚖️ Transaction TypeFractional / Limit / Market / Stock Split, etc.
  • 📊 Instrument TypeETF / Equity
  • 🌍 Country CodeCA

⚙️ Features

CRUD and complex operations on market entities
RESTful API endpoints for seamless integration
CockroachDB-backed storage for high availability and scalability


🚀 Versions

Stable Latest
2.1.22 2.1.22

🛠️ Tech Stack

Java
CockroachDB
Spring Boot
Spring JPA
Feign Client
Eureka
Protobuf
Guava
Gson
Apache Commons Lang3
Lombok

📚 Personal Libraries

  • 🏗️ twm-artifactory
    Centralized repository for source and compiled Protocol Buffers (Protobufs) used across TWM projects.

  • 🔗 twm-ping-client
    A lightweight library providing Eureka-based heartbeat (ping) functionality for service discovery.

🧪 Test Libraries

Mockito
JUnit
AssertJ
Spring Boot Test


Launch mechanism (local mode)

Pre-requisites:

  1. Start up local cockroachdb cluster
  2. Start up twm-eureka

Launch script:

  1. Ensure the stable version is checked out (or latest if you are more brave)
  2. Run the Local Build step if not already done, to generate the jar
  3. Fire up the script at 'twm-market-data-crdb.sh' using no args

Local Build

Pre-requisites:

  1. Checkout the latest libraries and build their jars for local maven repo (~/.m2)

Command:

mvn clean install


For questions or suggestions, please feel free to reach out to me at v2k.verma@gmail.com

About

Using Cockroach DB for Market Data and transactions storage

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published