Administrator
2024-04-03 bcf69d0d6589c0ee39c77326e8fb2d4bcbb144ed
l2/l2_transaction_data_manager.py
@@ -150,7 +150,6 @@
                    # 封存数据,计算新起点
                    # 大于50w的卖单才会保存
                    # 大于50w加入卖单
                    cls.__latest_all_sell_orders_dict[code].append(info)
                    money = info[1] * info[2]
                    if money >= 500000:
                        if is_active_sell(info[0]):
@@ -214,17 +213,20 @@
    # 获取最近成交数据
    @classmethod
    def get_latest_transaction_datas(cls, code, min_sell_order_no=None):
    def get_latest_transaction_datas(cls, code, min_sell_order_no=None, min_deal_time=None):
        total_orders = []
        sell_orders = cls.__latest_all_sell_orders_dict.get(code)
        if sell_orders:
            for i in range(len(sell_orders) - 1, -1, -1):
                if min_sell_order_no and min_sell_order_no > sell_orders[i][0]:
                if min_deal_time and tool.trade_time_sub(min_deal_time,
                                                         l2_huaxin_util.convert_time(sell_orders[i][3][0])) > 0:
                    break
                if min_sell_order_no and min_sell_order_no > sell_orders[i][0]:
                    continue
                total_orders.append(sell_orders[i])
            total_orders.extend(sell_orders)
        if code in cls.__latest_sell_order_dict:
            if min_sell_order_no :
            if min_sell_order_no:
                if cls.__latest_sell_order_dict[code][0] >= min_sell_order_no:
                    total_orders.append(cls.__latest_sell_order_dict[code])
            else: