| | |
| | | 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() |
| | |
| | | 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: |
| | |
| | | |
| | | 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( |
| | |
| | | |
| | | __deal_codes = set() |
| | | |
| | | |
| | | def read_l2_results(trade_call_back_queue): |
| | | while True: |
| | | try: |