Skip to the content.

TTAPI — Architecture One-Pager

High-performance financial data platform built with Rust

Author: Robert Nio • Updated: 2025-11-14


What It Is

TTAPI is a production-grade Rust application for financial data collection, processing, and analysis. It demonstrates world-class systems programming with:


Architecture

Workspace Structure (Polars-Inspired)

5 domain-separated crates:

  1. ttapi-core — Core types, errors, configuration, TTL utilities
  2. ttapi-client — HTTP client, OAuth2, circuit breakers, API wrappers
  3. ttapi-platform — Business logic, data processing, caching
  4. ttapi-polars — Polars extensions and LazyFrame utilities
  5. ttapi-onboarding — CLI interface with console grid UI

Layering: onboardingplatformclientcore

Benefits:


Performance Highlights

Real-World Benchmarks

Operation Cold Run Cached Run Speedup
Total Pipeline 3m 2s 7.8s 23x
Symbol Data (507 symbols) 52s 88ms 590x
EOD Processing (29M rows) 2m 26s 4s 36x
Core Data 16s 91ms 176x

Throughput Analysis

Resource Utilization


Technical Excellence

Async/Await Concurrency (Tokio)

Zero-Copy Data Processing (Polars)

Intelligent Caching (TTL-Based)

Circuit Breakers & Resilience


Code Quality

Standards (Rust Excellence Playbook 2025)

≥90% test coverage (llvm-cov with HTML reports) ✅ Zero clippy::pedantic warnings (strict linting) ✅ File headers (copyright, license, description) ✅ Panic-free public APIs (all errors are Result<T, E>) ✅ Benchmark suites (criterion/divan with flamegraphs) ✅ Structured logging (tracing with request IDs)

Error Handling

Testing & Validation


Data Pipeline

Sources

  1. TastyTrade REST API — Market data, symbols, accounts, option chains
  2. dxFeed WebSocket — Real-time streaming quotes
  3. MetaStock CSV — Historical EOD data (27.6M rows)

Processing

  1. Parallel collection: 100 concurrent API requests
  2. Lazy evaluation: Polars builds query plan, optimizes, executes once
  3. Deduplication: Remove 130k duplicate rows across sources
  4. Statistical analysis: Volatility, returns, confidence intervals

Persistence

  1. Parquet format: Columnar storage for analytics (2.69 GB)
  2. CSV format: Human-readable debugging (dual-format)
  3. Background I/O: Dedicated thread pool (compute doesn’t block)
  4. Atomic writes: Temp file → rename (crash-safe)

Observability

Console Grid UI

Structured Logging


Demo Videos

🎥 Watch Demo Videos — See cold run (3m 2s) vs. cached run (7.8s)

Video 1: Initial Run (8.4 MB)

Video 2: Cached Run (3.1 MB)


Additional Documentation

📊 Performance Benchmarks — Detailed metrics and throughput analysis 🏗️ Rust Excellence — Architecture deep-dive with code examples 🔍 Architecture Deep Dive — System diagrams and data flow ⚖️ Why Rust? — Technology comparison (Rust vs. Python/C++/Go)


Key Differentiators

vs. Python/Pandas

vs. C++

vs. Go


Contact

Robert Nio Rust Systems Engineer GitHub | LinkedIn


Note: TTAPI source code is private. This documentation showcases architecture and performance with public-safe information.

Copyright © 2025 SKY, LLC. All rights reserved.