-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
283 lines (218 loc) · 8.44 KB
/
.env.example
File metadata and controls
283 lines (218 loc) · 8.44 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
# GeoSync Environment Configuration
# Copy this file to .env and fill in your values
# NEVER commit .env to version control!
# =============================================================================
# Application Settings
# =============================================================================
# Environment: development, staging, production
GEOSYNC_ENV=development
# Log level: DEBUG, INFO, WARNING, ERROR, CRITICAL
LOG_LEVEL=INFO
# Secret used to sign audit records (must be at least 16 characters)
GEOSYNC_AUDIT_SECRET=replace_with_a_16_character_minimum_secret
# Secret used to sign RBAC audit records (must be at least 16 characters)
GEOSYNC_RBAC_AUDIT_SECRET=replace_with_a_16_character_minimum_secret
# Seed for TOTP-based admin two-factor authentication (do not reuse in production)
GEOSYNC_TWO_FACTOR_SECRET=provide_totp_seed_here
# Bootstrap strategy for service initialization: lazy, degraded, or disabled
GEOSYNC_BOOTSTRAP_STRATEGY=lazy
# Application port
PORT=8000
# =============================================================================
# Database Configuration
# =============================================================================
# PostgreSQL
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_USER=geosync
POSTGRES_PASSWORD=change_me_in_production
POSTGRES_DB=geosync
# Database URL (alternative to individual settings)
# DATABASE_URL=postgresql://user:password@localhost:5432/geosync
# =============================================================================
# Exchange API Credentials
# =============================================================================
# Binance
BINANCE_API_KEY=your_binance_api_key_here
BINANCE_API_SECRET=your_binance_api_secret_here
BINANCE_TESTNET=true
# Coinbase Pro
COINBASE_API_KEY=your_coinbase_api_key_here
COINBASE_API_SECRET=your_coinbase_api_secret_here
COINBASE_PASSPHRASE=your_coinbase_passphrase_here
COINBASE_SANDBOX=true
# Kraken
KRAKEN_API_KEY=your_kraken_api_key_here
KRAKEN_API_SECRET=your_kraken_api_secret_here
KRAKEN_OTP=optional_totp_code_if_enabled
# =============================================================================
# Data Providers
# =============================================================================
# Alpha Vantage
ALPHA_VANTAGE_API_KEY=your_alpha_vantage_key_here
# IEX Cloud
IEX_CLOUD_API_KEY=your_iex_cloud_key_here
IEX_CLOUD_SANDBOX=true
# Polygon.io
POLYGON_API_KEY=your_polygon_key_here
# =============================================================================
# Trading Configuration
# =============================================================================
# Initial capital (USD)
INITIAL_CAPITAL=10000.0
# Risk per trade (fraction of capital)
RISK_PER_TRADE=0.01
# Maximum drawdown (fraction)
MAX_DRAWDOWN=0.20
# Commission rate (fraction)
COMMISSION_RATE=0.001
# Slippage rate (fraction)
SLIPPAGE_RATE=0.0005
# =============================================================================
# Strategy Parameters
# =============================================================================
# Default window sizes
TRAIN_WINDOW=500
TEST_WINDOW=100
# Indicator periods
KURAMOTO_WINDOW=200
RSI_PERIOD=14
ENTROPY_BINS=50
# Signal thresholds
KURAMOTO_THRESHOLD=0.7
ENTROPY_THRESHOLD=2.0
RSI_OVERSOLD=30
RSI_OVERBOUGHT=70
# =============================================================================
# Monitoring & Observability
# =============================================================================
# Prometheus
PROMETHEUS_HOST=localhost
PROMETHEUS_PORT=9090
# Grafana
GRAFANA_HOST=localhost
GRAFANA_PORT=3000
GRAFANA_ADMIN_PASSWORD=change_me_in_production
# Metrics export
METRICS_PORT=8001
METRICS_ENABLED=true
# =============================================================================
# Logging Configuration
# =============================================================================
# Log file path
LOG_FILE=/var/log/geosync/app.log
# Log rotation
LOG_MAX_BYTES=10485760 # 10MB
LOG_BACKUP_COUNT=5
# Structured logging
LOG_FORMAT=json # json or text
# =============================================================================
# Security
# =============================================================================
# Secret key for session management
SECRET_KEY=generate_a_random_secret_key_here
# JWT settings
JWT_SECRET=generate_a_random_jwt_secret_here
JWT_EXPIRATION_HOURS=24
# API rate limiting
RATE_LIMIT_ENABLED=true
RATE_LIMIT_CALLS=100
RATE_LIMIT_PERIOD=60 # seconds
# =============================================================================
# Streamlit Dashboard Authentication
# =============================================================================
# Admin credentials for Streamlit dashboard
# Generate password hash using: python -c "import bcrypt; print(bcrypt.hashpw('your_password'.encode(), bcrypt.gensalt()).decode())"
DASHBOARD_ADMIN_USERNAME=admin
DASHBOARD_ADMIN_PASSWORD_HASH=$2b$12$EixZaYVK1fsbw1ZfbX3OXe.RKjKWbFUZYWbAKpKnvGmcPNW3OL2K6
# Default password for the hash above is: admin123 (CHANGE THIS IN PRODUCTION!)
# Cookie settings for session management
DASHBOARD_COOKIE_NAME=geosync_auth
DASHBOARD_COOKIE_KEY=generate_a_random_cookie_key_here
DASHBOARD_COOKIE_EXPIRY_DAYS=30
# =============================================================================
# Redis (optional)
# =============================================================================
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_DB=0
# =============================================================================
# Email Notifications (optional)
# =============================================================================
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your_email@gmail.com
SMTP_PASSWORD=your_app_password
SMTP_FROM=geosync@example.com
SMTP_TO=alerts@example.com
# =============================================================================
# Slack Notifications (optional)
# =============================================================================
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/YOUR/WEBHOOK/URL
SLACK_CHANNEL=#geosync-alerts
# =============================================================================
# Telegram Notifications (optional)
# =============================================================================
TELEGRAM_BOT_TOKEN=your_bot_token_here
TELEGRAM_CHAT_ID=your_chat_id_here
# =============================================================================
# AWS Configuration (optional)
# =============================================================================
AWS_ACCESS_KEY_ID=your_aws_access_key
AWS_SECRET_ACCESS_KEY=your_aws_secret_key
AWS_REGION=us-east-1
AWS_S3_BUCKET=geosync-data
# =============================================================================
# Google Cloud Configuration (optional)
# =============================================================================
GOOGLE_APPLICATION_CREDENTIALS=/path/to/credentials.json
GOOGLE_CLOUD_PROJECT=your-project-id
GOOGLE_CLOUD_BUCKET=geosync-data
# =============================================================================
# Advanced Features
# =============================================================================
# GPU acceleration
USE_GPU=false
CUDA_DEVICE=0
# Multiprocessing
MAX_WORKERS=4
# Caching
CACHE_ENABLED=true
CACHE_TTL=3600 # seconds
# =============================================================================
# Development Settings
# =============================================================================
# Debug mode (NEVER use in production!)
DEBUG=false
# Hot reload
HOT_RELOAD=false
# Profiling
ENABLE_PROFILING=false
# =============================================================================
# Testing
# =============================================================================
# Test database
TEST_DATABASE_URL=postgresql://test:test@localhost:5432/geosync_test
# Test mode
TESTING=false
# =============================================================================
# Notes
# =============================================================================
#
# How to generate secure secrets:
# python -c "import secrets; print(secrets.token_urlsafe(32))"
#
# How to use this file:
# 1. Copy to .env: cp .env.example .env
# 2. Fill in your values
# 3. Never commit .env to git
# 4. Load with: python-dotenv or docker compose --env-file .env
#
# Security reminders:
# - Never commit API keys or secrets
# - Use strong passwords
# - Rotate credentials regularly
# - Use different credentials for dev/staging/prod
# - Enable 2FA on exchange accounts
#