Administrator
2025-01-14 e12181ed11086f331d370aabf7e3884ad0ecf4dd
trade/trade_record_log_util.py
@@ -14,6 +14,7 @@
TYPE_FORBIDDEN_BUY = "forbidden_buy"  # 禁止买入
TYPE_CANT_PLACE_ORDER = "can_not_place_order"  # 不能下单
TYPE_CANCEL = "cancel"  # 撤单
TYPE_ACTION = "action"  # 针对代码的操作
class PlaceOrderInfo(object):
@@ -139,5 +140,20 @@
    __add_log(TYPE_CANCEL, code, {"msg": msg, "real_place_order_index": real_place_order_index})
# 加红信息
def add_must_buy(code, msg=""):
    __add_log(TYPE_ACTION, code, {"type": "加红", "msg": msg})
# 加绿
def add_green(code, msg=""):
    __add_log(TYPE_ACTION, code, {"type": "加绿", "msg": msg})
# 加白
def add_white_buy(code, msg=""):
    __add_log(TYPE_ACTION, code, {"type": "加白", "msg": msg})
if __name__ == "__main__":
    pass