Initial commit

This commit is contained in:
jackyu66git
2025-06-10 01:16:09 +08:00
commit 05bab03b8c
155 changed files with 19979 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
from typing import Dict, Optional
from Common.CEnum import TRADE_INFO_LST
class CTradeInfo:
def __init__(self, info: Dict[str, float]):
self.metric: Dict[str, Optional[float]] = {}
for metric_name in TRADE_INFO_LST:
self.metric[metric_name] = info.get(metric_name)
def __str__(self):
return " ".join([f"{metric_name}:{value}" for metric_name, value in self.metric.items()])