Administrator
4 天以前 48fb7a00951f91bdc707e5dd2d196e5bccb752c3
api/outside_api_command_callback.py
@@ -54,7 +54,8 @@
from trade.huaxin import huaxin_trade_api, huaxin_trade_data_update, \
    huaxin_trade_record_manager, huaxin_trade_order_processor, huaxin_sell_util
from trade.huaxin.huaxin_trade_record_manager import PositionManager, DealRecordManager, DelegateRecordManager
from trade.buy_radical.radical_buy_data_manager import RadicalBuyBlockManager, BeforeSubDealBigOrderManager
from trade.buy_radical.radical_buy_data_manager import RadicalBuyBlockManager, BeforeSubDealBigOrderManager, \
    TotalDealBigOrderThresholdMoneyManager
from trade.sell import sell_manager
from trade.sell.sell_rule_manager import TradeRuleManager, SellRule
from trade.trade_data_manager import RadicalBuyDealCodesManager
@@ -1319,7 +1320,9 @@
                    if volumes_data:
                        is_new_top = code_nature_analyse.is_new_top(code,
                                                                    gpcode_manager.get_limit_up_price_by_preprice(code,
                                                                                                                  volumes_data[0]["close"]),
                                                                                                                  volumes_data[
                                                                                                                      0][
                                                                                                                      "close"]),
                                                                    volumes_data)
                data = {
@@ -1476,8 +1479,26 @@
                                   client_id,
                                   request_id)
            elif ctype == "test_cancel_order":
                # 获取相同板块的涨停代码数量
                code = data.get("code")
                trade_manager.start_cancel_buy(code, force=True)
                self.send_response({"code": 0, "data": {}},
                                   client_id,
                                   request_id)
            elif ctype == "set_total_deal_big_order_threshold_money":
                code = data.get("code")
                money = data.get("money")
                if not code or not money:
                    self.send_response({"code": 1, "data": {}, "msg": "code/money为空"},
                                       client_id,
                                       request_id)
                    return
                TotalDealBigOrderThresholdMoneyManager().set_money(code, int(money))
                self.send_response({"code": 0, "data": {}},
                                   client_id,
                                   request_id)
        except Exception as e:
            logging.exception(e)
            logger_debug.exception(e)