Scala-based trading engine for the Open Bank Project (OBP) ecosystem.
Current Version: 0.1.0-SNAPSHOT
Development Phase: Model Architecture Complete (85%)
- ✅ Scala project structure with SBT
- ✅ Core trading models with account integration
- ✅ Connector architecture (Redis, PostgreSQL, Kafka, RabbitMQ)
- ✅ RedisOfferConnector implementation
- ✅ Comprehensive validation framework
- ✅ OBP Account Holds integration design
- 🚧 HTTP API endpoints
- 🚧 Authentication middleware
- 🚧 Database migrations
- 🚧 OBP-API client integration
- 🚧 WebSocket streaming
Trading Engine (Scala + http4s)
├── Models: Offer, Trade, AccountReservation
├── Connectors: Redis, PostgreSQL, Kafka, RabbitMQ
├── Validation: Account, Permission, Business Rules
└── OBP Integration: Account Holds + Transaction Requests
- Account-Linked Trading: Every offer/trade linked to OBP bank accounts
- OBP Account Holds: Use OBP-API holds for fund reservation (no separate accounts)
- Two-Layer Money: FIAT via OBP Transactions, trading via account holds
- Audit Trail:
user_id
andconsent_id
on all operations - Fully Qualified IDs:
offerId
,tradeId
, etc. (no generic "id" fields)
- Scala 2.13.15+
- SBT 1.9+
- Java 11+
- PostgreSQL 14+
- Redis 6+
- OBP-API instance
# Clone and build
git clone https://github.com/OpenBankProject/OBP-Trading
cd OBP-Trading
sbt compile
# Configure
cp src/main/resources/application.conf.example src/main/resources/application.conf
# Edit database and OBP-API settings
# Run (when ready)
sbt run
# OBP Integration
obp.api.baseUrl = "https://api.openbankproject.com"
obp.auth.jwtPublicKeyUrl = "https://api.openbankproject.com/.well-known/jwks.json"
# Connectors
connectors {
offer.type = "redis" # Fast offer storage
trade.type = "postgres" # Persistent trade records
user.type = "obp-api" # OBP user integration
}
See ai.log
for detailed development history and architectural decisions.
AGPL-3.0
Copyright (c) TESOBE 2025. All rights reserved.