Refactor database operations and enhance repository structure
- 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.
This commit is contained in:
1 parent
848119e2cb
commit
028371a0e1
11 files changed
+787
-452
No files matched your search
@@ -17,7 +17,7 @@
|
||||
"factory": {
|
||||
"use_factory_pattern": true,
|
||||
"default_data_types": ["trade", "orderbook"],
|
||||
"default_timeframes": ["5s", "30s", "1m", "5m", "15m", "1h"],
|
||||
"default_timeframes": ["1s", "5s", "1m", "5m", "15m", "1h"],
|
||||
"batch_create": true
|
||||
},
|
||||
"trading_pairs": [
|
||||
@@ -25,7 +25,7 @@
|
||||
"symbol": "BTC-USDT",
|
||||
"enabled": true,
|
||||
"data_types": ["trade", "orderbook"],
|
||||
"timeframes": ["5s", "1m", "5m", "15m", "1h"],
|
||||
"timeframes": ["1s", "5s", "1m", "5m", "15m", "1h"],
|
||||
"channels": {
|
||||
"trades": "trades",
|
||||
"orderbook": "books5",
|
||||
@@ -36,7 +36,7 @@
|
||||
"symbol": "ETH-USDT",
|
||||
"enabled": true,
|
||||
"data_types": ["trade", "orderbook"],
|
||||
"timeframes": ["5s", "1m", "5m", "15m", "1h"],
|
||||
"timeframes": ["1s", "5s", "1m", "5m", "15m", "1h"],
|
||||
"channels": {
|
||||
"trades": "trades",
|
||||
"orderbook": "books5",
|
||||
|
||||
Reference in new issue
Block a user