Terminal Trading Platform
Go-based trading backend with copy-trading, risk engine, and MetaTrader 5 integration
- Stack
- GoPostgreSQLRabbitMQWebSocketsDocker
A trading firm needs infrastructure to manage multiple trading sessions across MetaTrader 5, with real-time order management, risk controls, copy-trading between master and slave accounts, and a live dashboard.
A microservices backend monorepo providing:
- Go REST API for auth, sessions, orders, risk, and portfolio
- MT5 bridge service for MetaTrader 5 communication
- OMS/RMS for order validation and risk management
- RabbitMQ for async inter-service messaging
- WebSocket streams for real-time dashboards
Frontend Dashboard ──── API (Go:8080) ──── PostgreSQL (5432)
(WebSocket) │
RabbitMQ (5672)
│
┌─────────────┼─────────────┐
MT5 Bridge OMS / RMS Event Workers
(5556)
│
MetaTrader 5Go over Node.js
Concurrency model suits high-throughput event processing.
RabbitMQ over Redis pub/sub
Durable message delivery for order events.
Event-driven copy-trading
Master/slave sync via events, not polling.
Three WebSocket stream types
Single session, all sessions, and full table data views.
{
"type": "session_update",
"session_id": "sess_7f3a9b",
"data": {
"status": "active",
"equity": 12450.80,
"margin_used": 3200.00,
"open_positions": 5,
"unrealized_pnl": 340.25,
"risk_level": "normal"
},
"timestamp": "2025-11-14T09:32:15.442Z"
}Go, PostgreSQL, RabbitMQ (AMQP)
REST API, MT5 Bridge, OMS/RMS, Event Workers
Docker Compose, PgAdmin, Makefile
JWT, RBAC (admin/investor roles)
WebSockets (3 stream types)
Next case study
AgriVision AI
→