Skip to content

A simple trading chart service that consumes prices over streaming connection, aggregates the same into candlesticks, emits them and persists them as well

Notifications You must be signed in to change notification settings

onkarbanerjee/trading-chart-service

Repository files navigation

Trading Chart Service

A Go-based trading chart service that ingests real-time tick data from Binance, aggregates it into 1-minute OHLC candlesticks, streams current candle updates via gRPC, and persists completed candles to a datastore. Designed for deployment on Kubernetes using Terraform.


πŸ”§ Technologies

  • Go
  • gRPC
  • Binance WebSocket API
  • PostgreSQL / In-memory store (toggle)
  • Kubernetes
  • Terraform

πŸš€ Getting Started

Prerequisites

  • Go 1.20+
  • Docker
  • kubectl
  • Terraform
  • protoc compiler with Go plugins

1. Clone and Build

git clone https://github.com/yourusername/trading-chart-service.git
cd trading-chart-service
go build ./cmd/aggregator

2. Run Locally

go run ./cmd/aggregator

This will start:

  • The Binance WebSocket client
  • The candle aggregator
  • The gRPC streaming server

3. Run Tests

go integration_test ./internal/aggregator

πŸ“¦ Kubernetes Deployment

  1. Build Docker Image
docker build -t trading-chart-service:latest .

About

A simple trading chart service that consumes prices over streaming connection, aggregates the same into candlesticks, emits them and persists them as well

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published