Kalshi Demo Environment Support
This post covers the implementation of ADR-015 (Kalshi Demo Environment Support), enabling safe testing with Kalshi's demo API without risking production credentials or capital.
This post covers the implementation of ADR-015 (Kalshi Demo Environment Support), enabling safe testing with Kalshi's demo API without risking production credentials or capital.
Completing the remaining implementation gaps across ADRs 004, 005, 007, and 009 with thread-safe nonce management, risk manager actor, compensation executor, and key rotation support.
How we resolved an ADR naming conflict and established bidirectional traceability between requirements, decisions, and implementation.
How we built infrastructure-as-code with Terraform for deploying our trading system to AWS, including ECS Fargate, Aurora PostgreSQL, and ElastiCache Redis.
How we built a trading control plane with gRPC for programmatic access and Telegram for mobile-friendly monitoring.
How we implemented AES-256-GCM encryption with HKDF key derivation for secure credential storage, including memory safety with zeroize.
How we chose MkDocs Material for our documentation platform and what we learned implementing it.
Implementing efficient orderbook state management for real-time market data using BTreeMap and incremental delta updates.
How we implemented a lock-free orderbook cache using arc_swap and dashmap to minimize latency in our arbitrage detection loop.
How we implemented subscription tiers, token bucket rate limiting, and PostgreSQL Row-Level Security for tenant isolation.