| | |
| | | from l2.l2_sell_manager import L2MarketSellManager |
| | | from l2.l2_transaction_data_manager import HuaXinBuyOrderManager |
| | | from third_data.third_blocks_manager import InvalidBlockManager, CodeThirdBlocksManager |
| | | from trade.buy_money_count_setting import BuyMoneyAndCountSetting |
| | | from trade.deal_big_money_manager import DealOrderNoManager |
| | | from trade.trade_manager import AutoCancelSellModeManager |
| | | from utils import tool |
| | |
| | | |
| | | CodeThirdBlocksManager() |
| | | |
| | | BuyMoneyAndCountSetting() |
| | | |
| | | gpcode_manager.WantBuyCodesManager() |
| | | |
| | | # 9点25之前删除所有代码 |
| | | if tool.trade_time_sub(tool.get_now_time_str(), "09:25:00") <= 0: |
| | | # 删除L2监听代码 |
| | |
| | | if dealing_info and str(dealing_info[0]) == str(val["orderNo"]): |
| | | total_left_num -= dealing_info[1] // 100 |
| | | limit_up_price = gpcode_manager.get_limit_up_price(code) |
| | | total_left_money = total_left_num * float(limit_up_price)*100 |
| | | if total_left_money < 1e8: |
| | | if total_left_count <= 1 or (total_left_count <= THRESHOLD_COUNT and limit_up_price and total_left_num * float( |
| | | limit_up_price) < THRESHOLD_MONEY_W * 100): |
| | | return True, f"剩余笔数({total_left_count})/金额({round(total_left_num * float(limit_up_price) * 100)})不足,成交进度:{trade_index},真实下单位置:{real_order_index} 阈值:({THRESHOLD_MONEY_W},{THRESHOLD_COUNT}) " |
| | |
| | | # except: |
| | | # pass |
| | | |
| | | # 初始化数据 |
| | | BuyMoneyAndCountSetting() |
| | | gpcode_manager.WantBuyCodesManager() |
| | | |
| | | |
| | | def run(queue_strategy_r_trade_w, queue_strategy_w_trade_r, queue_strategy_w_trade_r_for_read, trade_ipc_addr): |
| | | """ |
| | |
| | | self.__code_blocks_dict[code] = set() |
| | | self.__code_blocks_dict[code].add(block) |
| | | |
| | | if code not in self.__block_codes_dict: |
| | | if block not in self.__block_codes_dict: |
| | | self.__block_codes_dict[block] = set() |
| | | self.__block_codes_dict[block].add(code) |
| | | |