| | |
| | | return |
| | | radical_buy_data_manager.ExcludeIndexComputeCodesManager.remove_code(code) |
| | | |
| | | |
| | | if result_by_volume[0] == radical_buy_strategy.BUY_MODE_DIRECT: |
| | | refer_sell_data = L2MarketSellManager().get_refer_sell_data(code, |
| | | l2_huaxin_util.convert_time( |
| | |
| | | sell_info=sell_info, |
| | | threshold_money=threshold_money) |
| | | L2TradeDataProcessor.save_order_begin_data(code, order_begin_pos_info) |
| | | L2TradeDataProcessor.start_buy(code, total_datas[-1], total_datas[-1]["index"], True) |
| | | buy_result = L2TradeDataProcessor.start_buy(code, total_datas[-1], total_datas[-1]["index"], |
| | | True) |
| | | if buy_result: |
| | | # 下单成功 |
| | | radical_buy_data_manager.BlockPlaceOrderRecordManager().add_record(code, buy_blocks) |
| | | else: |
| | | RadicalBuyDealCodesManager.buy_by_l2_delegate_expire_time_dict[code] = ( |
| | | time.time() + 2, transaction_datas[-1][6], buy_blocks) |
| | |
| | | try: |
| | | volume = tool.get_buy_volume_by_money(limit_up_price, constant.AVAILABLE_BUY_MONEYS[0]) |
| | | result = huaxin_trade_api.order(huaxin_trade_api.TRADE_DIRECTION_BUY, code, volume, limit_up_price, |
| | | blocking=True, |
| | | blocking=False, |
| | | shadow_price=shadow_price, shadow_volume=volume) |
| | | async_log_util.info(logger_trade, f"{code}下单结束:{result}") |
| | | buy_open_limit_up_strategy.BuyOpenLimitupDataManager().set_place_order_info(code, volume, volume) |
| | | buy_open_limit_up_strategy.BuyOpenLimitupDataManager().set_place_order_info(code, volume, volume, |
| | | result.get("order_ref")) |
| | | except Exception as e: |
| | | pass |
| | | |