Beispiel #1
0
 def send_order(self, order_req: OrderRequest) -> AnyStr:
     """发单"""
     result = self.risk_gateway.send(self)
     if False in result:
         event = Event(type=EVENT_LOG, data="风控阻止下单")
         self.event_engine.put(event)
         return
     send_monitor.send(order_req)
     return self.trader.send_order(order_req)
Beispiel #2
0
 def send_order(self, order_req: OrderRequest) -> AnyStr:
     """发单"""
     send_monitor.send(order_req)
     return self.trader.send_order(order_req)
Beispiel #3
0
 def send_order(self, order_req: OrderRequest) -> AnyStr:
     """发单"""
     if self.trader is None:
         raise ValueError("当前账户交易api未登录")
     send_monitor.send(order_req)
     return self.trader.send_order(order_req)