-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.env.example
More file actions
148 lines (124 loc) · 4.87 KB
/
Copy path.env.example
File metadata and controls
148 lines (124 loc) · 4.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# OBP-Trading Environment Configuration
# Copy this file to .env and update the values for your environment
# =============================================================================
# Server Configuration
# =============================================================================
SERVER_PORT=8080
SERVER_HOST=0.0.0.0
RUST_LOG=obp_trading=debug,tower_http=debug,info
# =============================================================================
# Database Configuration
# =============================================================================
DATABASE_URL=postgresql://obp_trading:password@localhost:5432/obp_trading
# =============================================================================
# Redis Configuration
# =============================================================================
REDIS_URL=redis://localhost:6379
# =============================================================================
# OBP-API-II Integration
# =============================================================================
OBP_API_BASE_URL=http://localhost:8080
OBP_API_VERSION=v5.1.0
OBP_API_TIMEOUT=30
OBP_API_VERIFY_SSL=true
OBP_API_CLIENT_ID=obp-trading-client
OBP_API_CLIENT_SECRET=your-obp-api-client-secret-here
# =============================================================================
# OBP-OIDC Authentication
# =============================================================================
OIDC_PROVIDER_URL=http://localhost:9000/obp-oidc
OIDC_CLIENT_ID=obp-trading
OIDC_CLIENT_SECRET=your-oidc-client-secret-here
JWT_SECRET=your-jwt-secret-key-for-local-tokens-here
TOKEN_EXPIRY_SECONDS=3600
JWKS_CACHE_TTL=300
# =============================================================================
# Trading Engine Configuration
# =============================================================================
# Offer limits
MAX_OFFERS_PER_USER=100
MIN_OFFER_AMOUNT=1.00
MAX_OFFER_AMOUNT=1000000.00
OFFER_EXPIRY_SECONDS=86400
# Price controls
MAX_PRICE_DEVIATION_PERCENT=10.0
# Order book settings
ORDERBOOK_DEPTH=50
# Rate limiting (requests per minute)
RATE_LIMIT_OFFERS_PER_MINUTE=10
RATE_LIMIT_REQUESTS_PER_MINUTE=100
RATE_LIMIT_WS_PER_MINUTE=5
# =============================================================================
# Trading Pairs Configuration (JSON format)
# =============================================================================
TRADING_PAIRS=[
{
"symbol": "EUR/USD",
"base_currency": "EUR",
"quote_currency": "USD",
"tick_size": "0.0001",
"min_quantity": "1.00",
"max_quantity": "100000.00",
"active": true
},
{
"symbol": "GBP/USD",
"base_currency": "GBP",
"quote_currency": "USD",
"tick_size": "0.0001",
"min_quantity": "1.00",
"max_quantity": "100000.00",
"active": true
},
{
"symbol": "BTC/USD",
"base_currency": "BTC",
"quote_currency": "USD",
"tick_size": "0.01",
"min_quantity": "0.001",
"max_quantity": "100.000",
"active": true
}
]
# =============================================================================
# Development/Testing Configuration
# =============================================================================
# Set to true to enable additional debugging features
DEBUG_MODE=false
# Mock external services for testing
MOCK_OBP_API=false
MOCK_OIDC=false
# Database migrations
AUTO_MIGRATE=true
# =============================================================================
# Production Configuration
# =============================================================================
# SSL/TLS Settings (for production)
# SERVER_TLS_CERT_PATH=/path/to/cert.pem
# SERVER_TLS_KEY_PATH=/path/to/key.pem
# External service URLs for production
# OBP_API_BASE_URL=https://api.openbankproject.com
# OIDC_PROVIDER_URL=https://auth.yourdomain.com/obp-oidc
# DATABASE_URL=postgresql://user:password@db.yourdomain.com:5432/obp_trading_prod
# REDIS_URL=redis://redis.yourdomain.com:6379
# Security settings for production
# JWT_SECRET=your-very-secure-jwt-secret-key-here
# OIDC_CLIENT_SECRET=your-production-oidc-client-secret
# OBP_API_CLIENT_SECRET=your-production-obp-api-client-secret
# =============================================================================
# Monitoring and Observability
# =============================================================================
# Metrics and health check endpoints
ENABLE_METRICS=true
ENABLE_HEALTH_CHECKS=true
# Tracing configuration
TRACING_ENDPOINT=http://localhost:14268/api/traces
SERVICE_NAME=obp-trading
# =============================================================================
# Container/Docker Configuration
# =============================================================================
# When running in Docker containers, use container names
# DATABASE_URL=postgresql://obp_trading:password@postgres:5432/obp_trading
# REDIS_URL=redis://redis:6379
# OBP_API_BASE_URL=http://obp-api-ii:8080
# OIDC_PROVIDER_URL=http://obp-oidc:9000/obp-oidc