|
33 | 33 | from freqtrade.exchange import Exchange, timeframe_to_minutes, timeframe_to_msecs |
34 | 34 | from freqtrade.exchange.exchange_utils import price_to_precision |
35 | 35 | from freqtrade.loggers import bufferHandler |
36 | | -from freqtrade.persistence import CustomDataWrapper, KeyStoreKeys, KeyValueStore, PairLocks, Trade |
| 36 | +from freqtrade.persistence import CustomDataWrapper, KeyValueStore, PairLocks, Trade |
37 | 37 | from freqtrade.persistence.models import PairLock |
38 | 38 | from freqtrade.plugins.pairlist.pairlist_helpers import expand_pairlist |
39 | 39 | from freqtrade.rpc.fiat_convert import CryptoToFiatConverter |
@@ -635,7 +635,7 @@ def _rpc_trade_statistics( |
635 | 635 | first_date = trades[0].open_date_utc if trades else None |
636 | 636 | last_date = trades[-1].open_date_utc if trades else None |
637 | 637 | num = float(len(durations) or 1) |
638 | | - bot_start = KeyValueStore.get_datetime_value(KeyStoreKeys.BOT_START_TIME) |
| 638 | + bot_start = KeyValueStore.get_datetime_value("bot_start_time") |
639 | 639 | return { |
640 | 640 | "profit_closed_coin": profit_closed_coin_sum, |
641 | 641 | "profit_closed_percent_mean": round(profit_closed_ratio_mean * 100, 2), |
@@ -1601,15 +1601,15 @@ def health(self) -> dict[str, str | int | None]: |
1601 | 1601 | } |
1602 | 1602 | ) |
1603 | 1603 |
|
1604 | | - if bot_start := KeyValueStore.get_datetime_value(KeyStoreKeys.BOT_START_TIME): |
| 1604 | + if bot_start := KeyValueStore.get_datetime_value("bot_start_time"): |
1605 | 1605 | res.update( |
1606 | 1606 | { |
1607 | 1607 | "bot_start": str(bot_start), |
1608 | 1608 | "bot_start_loc": format_date(bot_start.astimezone(tzlocal())), |
1609 | 1609 | "bot_start_ts": int(bot_start.timestamp()), |
1610 | 1610 | } |
1611 | 1611 | ) |
1612 | | - if bot_startup := KeyValueStore.get_datetime_value(KeyStoreKeys.STARTUP_TIME): |
| 1612 | + if bot_startup := KeyValueStore.get_datetime_value("startup_time"): |
1613 | 1613 | res.update( |
1614 | 1614 | { |
1615 | 1615 | "bot_startup": str(bot_startup), |
|
0 commit comments