| | |
| | | elif ctype == "test_place_order": |
| | | # 获取相同板块的涨停代码数量 |
| | | code = data.get("code") |
| | | total_datas = l2_data_util.local_today_datas.get(code) |
| | | trade_manager.test_order(code, total_datas[-1], total_datas[-1]["index"]) |
| | | # total_datas = l2_data_util.local_today_datas.get(code) |
| | | # trade_manager.test_order(code, total_datas[-1], total_datas[-1]["index"]) |
| | | # radical_buy_data_manager.pull_pre_deal_big_orders(code) |
| | | self.send_response({"code": 0, "data": {}}, |
| | | client_id, |
| | |
| | | RADICAL_BUY_TOP_IN_INDEX_WITH_SPECIAL = 20 |
| | | |
| | | # 是否为新版下单 |
| | | IS_NEW_VERSION_PLACE_ORDER = True |
| | | IS_NEW_VERSION_PLACE_ORDER = False |
| | |
| | | |
| | | if add_codes: |
| | | logger_system.info(f"新增L2订阅代码数量({'缓存' if from_cache else ''}):{len(add_codes)}") |
| | | for c in add_codes: |
| | | logger_l2_codes_subscript.info(f"l2委托数据过滤条件:{c} - {self.codes_volume_and_price_dict.get(c)}") |
| | | |
| | | logger_l2_codes_subscript.info("华鑫L2订阅结束,add-{} del-{}", len(add_codes), len(del_codes)) |
| | | |
| | |
| | | init_data_util.re_set_price_pre(code) |
| | | limit_up_price = gpcode_manager.get_limit_up_price_as_num(code) |
| | | min_volume = int(round(50 * 10000 / limit_up_price)) |
| | | |
| | | special_volumes = BuyMoneyUtil.get_possible_buy_volumes(limit_up_price) |
| | | special_volumes |= set([tool.get_buy_volume_by_money(limit_up_price, x) for x in constant.AVAILABLE_BUY_MONEYS]) |
| | | |
| | | # 传递笼子价 |
| | | add_datas.append( |
| | | # (代码, 最小量, 涨停价,影子订单价格,买量, 特殊价格) |
| | | (code, min_volume, limit_up_price, round(tool.get_shadow_price(limit_up_price), 2), |
| | | tool.get_buy_volume(limit_up_price), |
| | | [tool.get_buy_volume_by_money(limit_up_price, x) for x in constant.AVAILABLE_BUY_MONEYS])) |
| | | list(special_volumes))) |
| | | huaxin_target_codes_manager.HuaXinL2SubscriptCodesManager.push(add_datas, 0) |
| | | |
| | | |
| | |
| | | |
| | | |
| | | if __name__ == '__main__': |
| | | print(BuyMoneyUtil.get_possible_buy_volumes(14.38)) |
| | | limit_up_price = 14.38 |
| | | special_volumes = BuyMoneyUtil.get_possible_buy_volumes(limit_up_price) |
| | | special_volumes |= set([tool.get_buy_volume_by_money(limit_up_price, x) for x in constant.AVAILABLE_BUY_MONEYS]) |
| | | print(special_volumes) |
| | | |
| | | |
| | | # print(json.dumps(list(BuyMoneyUtil.get_possible_buy_moneys()))) |