Administrator
2024-05-24 f46ddbbc3f4aa6078a35dad139b90637a08c630c
bug修复
1个文件已修改
11 ■■■■ 已修改文件
main.py 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
main.py
@@ -81,7 +81,10 @@
                if direction == 2:
                    # price_type: 0-价格笼子 1-跌停价  2-涨停价 3-现价 4-买5价
                    async_log_util.info(logger_trade, f"API卖: 接收数据-{data}")
                    current_price = None  # L1DataProcessor.get_l1_current_price(code)
                    current_price = None
                    market_info = code_market_manager.get_market_info(code)
                    if market_info:
                        current_price = market_info.price
                    limit_down_price = target_codes_manager.get_limit_down_price(code)
                    limit_up_price = target_codes_manager.get_limit_up_price(code)
                    order_ref = huaxin_util.create_order_ref()
@@ -139,7 +142,7 @@
            underlying_market = code_market_manager.get_market_info(underlying_code)
            if cb_market:
                r["marketInfo"] = {"code": cb_market.code, "name": r["securityName"],
                                   "rate": f"{round(cb_market.rate * 100,2)}%",
                                   "rate": f"{round(cb_market.rate * 100, 2)}%",
                                   "price": cb_market.price, "lastVolume": cb_market.total_bid_volume // 100,
                                   "buy1Money": output_util.money_desc(cb_market.buy1_price * cb_market.buy1_volume)}
            if underlying_market:
@@ -151,7 +154,8 @@
                r["underlyingMarketInfo"] = {"code": underlying_market.code,
                                             "name": gpcode_manager.CodesNameManager().get_code_name(
                                                 underlying_market.code), "rate": f"{round(underlying_market.rate * 100,2)}%",
                                                 underlying_market.code),
                                             "rate": f"{round(underlying_market.rate * 100, 2)}%",
                                             "price": underlying_market.price,
                                             "lastVolume": underlying_market.total_bid_volume // 100,
                                             "buy1Money": output_util.money_desc(
@@ -190,6 +194,7 @@
__deal_codes = set()
def read_l2_results(trade_call_back_queue):
    while True:
        try: