| | |
| | | """ |
| | | L2数据溯源 |
| | | """ |
| | | import constant |
| | | from utils import tool |
| | | |
| | | |
| | |
| | | for bd in buy_datas: |
| | | # 根据订单号做匹配 |
| | | if bd["val"]["orderNo"] == cancel_data["val"]["orderNo"]: |
| | | return bd |
| | | return bd["index"] |
| | | return None |
| | | |
| | | # 同花顺渠道的L2,根据买撤数据查找买入数据 |
| | |
| | | buy_index = cls.__get_buy_index_cache(code, cancel_data["index"]) |
| | | if buy_index is not None: |
| | | return buy_index |
| | | return cls.__get_buy_index_with_cancel_data_by_ths_l2(code, cancel_data, local_today_num_operate_map) |
| | | if constant.L2_SOURCE_TYPE == constant.L2_SOURCE_TYPE_HUAXIN: |
| | | return cls.__get_buy_index_with_cancel_data_by_huaxin_l2(code, cancel_data, local_today_num_operate_map) |
| | | else: |
| | | return cls.__get_buy_index_with_cancel_data_by_ths_l2(code, cancel_data, local_today_num_operate_map) |
| | | |
| | | # 根据买撤数据(与今日总的数据)计算买入数据 |
| | | @classmethod |