Files
foxhunt/services/trading_service
jgrusewski 643b9505a4 feat: WORKSPACE COMPILES — zero candle, zero errors, GPU-native
Final 58 compile errors fixed + GPU violation analysis:
- 23 files across ml, ml-dqn, ml-supervised, services
- flash_attention: CudaBlas + stream fields, GPU matmul/transpose
- ensemble adapters (tggn, tlob, mamba2, tft, ppo): StreamTensor/GpuLinear
- diffusion/xlstm/mamba trainable: StreamTensor ↔ GpuTensor conversion
- hyperopt adapters: fixed API signatures
- trainers (liquid, mamba2): checkpoint save via safetensors
- benchmarks: fixed to_scalar, RainbowAgent API
- services: MlDevice, PPO::load_checkpoint, Mamba2SSM constructor

Host-side softmax/distributional functions analyzed — operating on
legitimately-downloaded small output tensors at computation endpoints.
Not GPU violations (cold paths, <50 elements).

FULL WORKSPACE: 0 errors, 56 warnings, 0 candle dependencies.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 13:31:35 +01:00
..

trading_service

Core execution engine for order placement, position keeping, risk integration, and real-time P&L tracking.

Key Types

  • TradingServiceImpl -- main gRPC service
  • OrderExecutor -- high-throughput order handling
  • PositionManager -- real-time position and P&L tracking
  • RiskIntegration -- pre-trade and post-trade compliance

gRPC Endpoints

  • PlaceOrder -- submit new orders
  • CancelOrder -- cancel existing orders
  • GetPosition -- query current positions
  • SubscribeMarketData -- market data feeds
  • GetPnlUpdates -- real-time P&L updates

Configuration

  • GRPC_PORT -- gRPC listen port
  • DATABASE_URL -- PostgreSQL connection string
  • TLS_ENABLED -- enable TLS 1.3 (default: false)
  • TLS_CERT_PATH, TLS_KEY_PATH, TLS_CA_PATH -- TLS certificates
  • TLS_REQUIRE_CLIENT_CERT -- mutual TLS (default: false)

Testing

SQLX_OFFLINE=true cargo test -p trading_service --lib