| | |
| | | # data['OrderTime'],data['MainSeq'], data['SubSeq'], data['OrderNO'], data['OrderStatus']) |
| | | |
| | | |
| | | def convert_time(time_str, with_ms=False): |
| | | if time_str.startswith("9"): |
| | | time_str = f"0{time_str}" |
| | | ms = "{:0<3}".format(time_str[6:]) |
| | | time_ = f"{time_str[0:2]}:{time_str[2:4]}:{time_str[4:6]}" |
| | | if with_ms: |
| | | return f"{time_}.{ms}" |
| | | return time_ |
| | | |
| | | |
| | | def __convert_order(item, limit_up_price): |
| | | time_str = f"{item[5]}" |
| | | if time_str.startswith("9"): |
| | |
| | | import constant |
| | | from code_attribute import gpcode_manager |
| | | import l2.l2_data_util |
| | | from l2.huaxin import l2_huaxin_util |
| | | from log_module import log, log_export |
| | | from l2 import l2_data_source_util |
| | | from trade import deal_big_money_manager |
| | |
| | | # 买 |
| | | if cancel_data: |
| | | try: |
| | | cancel_info = "{}-{}".format(cancel_data["index"], cancel_data["val"]["time"]) |
| | | cancel_info = "{}-{}".format(cancel_data["index"], f"{cancel_data['val']['time']}.{cancel_data['val']['tms']}") |
| | | except Exception as e: |
| | | logging.exception(e) |
| | | else: |
| | | if int(data["val"].get("orderNo")) in deal_list_dict: |
| | | cancel_info = deal_list_dict[int(data["val"].get("orderNo"))][3] |
| | | cancel_info = l2_huaxin_util.convert_time(deal_list_dict[int(data["val"].get("orderNo"))][3]) |
| | | format_data.append(cancel_info) |
| | | cancel_order_info = None |
| | | if trade_info: |