- Introduced a modular repository structure by creating separate repository classes for `Bot`, `MarketData`, and `RawTrade`, improving code organization and maintainability. - Updated the `DatabaseOperations` class to utilize the new repository classes, enhancing the abstraction of database interactions. - Refactored the `.env` file to update database connection parameters and add new logging and health monitoring configurations. - Modified the `okx_config.json` to change default timeframes for trading pairs, aligning with updated requirements. - Added comprehensive unit tests for the new repository classes, ensuring robust functionality and reliability. These changes improve the overall architecture of the database layer, making it more scalable and easier to manage.
49 lines
1.0 KiB
Bash
49 lines
1.0 KiB
Bash
# Database Configuration
|
|
POSTGRES_DB=dashboard
|
|
POSTGRES_USER=dashboard
|
|
POSTGRES_PASSWORD=sdkjfh534^jh
|
|
POSTGRES_HOST=localhost
|
|
POSTGRES_PORT=5434
|
|
DATABASE_URL=postgresql://dashboard:sdkjfh534^jh@localhost:5434/dashboard
|
|
|
|
# Redis Configuration
|
|
REDIS_HOST=localhost
|
|
REDIS_PORT=6379
|
|
REDIS_PASSWORD=redis987secure
|
|
|
|
# OKX API Configuration
|
|
OKX_API_KEY=your_okx_api_key_here
|
|
OKX_SECRET_KEY=your_okx_secret_key_here
|
|
OKX_PASSPHRASE=your_okx_passphrase_here
|
|
OKX_SANDBOX=true
|
|
|
|
# Application Configuration
|
|
DEBUG=true
|
|
ENVIRONMENT=development
|
|
LOG_LEVEL=INFO
|
|
|
|
# Dashboard Configuration
|
|
DASH_HOST=0.0.0.0
|
|
DASH_PORT=8050
|
|
DASH_DEBUG=true
|
|
|
|
# Bot Configuration
|
|
MAX_CONCURRENT_BOTS=5
|
|
BOT_UPDATE_INTERVAL=2
|
|
DEFAULT_VIRTUAL_BALANCE=10000
|
|
|
|
# Data Configuration
|
|
MARKET_DATA_SYMBOLS=BTC-USDT,ETH-USDT,LTC-USDT
|
|
HISTORICAL_DATA_DAYS=30
|
|
CHART_UPDATE_INTERVAL=2000
|
|
|
|
# Logging
|
|
VERBOSE_LOGGING = true
|
|
LOG_CLEANUP=true
|
|
LOG_MAX_FILES=30
|
|
|
|
# Health monitoring
|
|
DEFAULT_HEALTH_CHECK_INTERVAL=30
|
|
MAX_SILENCE_DURATION=300
|
|
MAX_RECONNECT_ATTEMPTS=5
|
|
RECONNECT_DELAY=5 |