Administrator
2025-01-09 7de28c45eb5fc393bfed07ffbefb69dc63eeaa4d
l2/l2_transaction_data_manager.py
@@ -122,15 +122,19 @@
        """
        return self.__total_buy_datas_dict.get(code)
    def get_total_sell_money(self, code):
    def get_total_sell_money(self, code, threshold_money=None):
        """
        获取总共的大单卖金额
        @param threshold_money: 大单阈值
        @param code:
        @return:
        """
        if code not in self.__total_sell_datas_dict:
            return 0
        return int(sum([x[2] for x in self.__total_sell_datas_dict[code]]))
        if threshold_money:
            return int(sum([x[2] if x[2]>=threshold_money else 0 for x in self.__total_sell_datas_dict[code]]))
        else:
            return int(sum([x[2] for x in self.__total_sell_datas_dict[code]]))
# 成交数据统计