Skip to content

mantis-exchange/mantis-order

Repository files navigation

mantis-order

Order lifecycle management service for Mantis Exchange. Validates orders, freezes balances, submits to the matching engine, and settles trades.

Flow

sequenceDiagram
    participant G as Gateway
    participant O as Order Service
    participant A as Account Service
    participant R as Risk Service
    participant E as Matching Engine
    participant K as Kafka

    G->>O: PlaceOrder
    O->>R: Pre-trade risk check
    O->>A: Freeze balance
    O->>E: Submit to matching engine
    E-->>K: Trade events
    K-->>O: Consume trades
    O->>A: Settle balances
Loading

Configuration

Variable Default Description
PORT 50052 gRPC server port
DB_URL postgres://... PostgreSQL
MATCHING_ENGINE_ADDR localhost:50051 Matching engine
KAFKA_BROKERS localhost:9092 Kafka brokers
ACCOUNT_SERVICE_ADDR http://localhost:50053 Account service
RISK_SERVICE_ADDR http://localhost:50055 Risk service

Quick Start

go build -o mantis-order ./cmd/order
./mantis-order

MIT License

About

Mantis Exchange - Order lifecycle management

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors