|
|
@@ -467,7 +467,7 @@ impl Quant {
|
|
|
print!("触发onOrder");
|
|
|
self._update_local_orders(&order);
|
|
|
//交易所处理订单信号
|
|
|
- let platform_rest_fb = self.platform_rest.clone_box();
|
|
|
+ let mut platform_rest_fb = self.platform_rest.clone_box();
|
|
|
info!("订单指令:{:?}", order);
|
|
|
tokio::spawn(async move{
|
|
|
info!("订单指令:{:?}", order);
|
|
|
@@ -604,7 +604,7 @@ impl Quant {
|
|
|
self._update_local_orders(&orders);
|
|
|
|
|
|
//异步交易所处理订单信号
|
|
|
- let platform_rest_fb = self.platform_rest.clone_box();
|
|
|
+ let mut platform_rest_fb = self.platform_rest.clone_box();
|
|
|
info!("订单指令:{:?}", orders);
|
|
|
tokio::spawn(async move{
|
|
|
info!("订单指令:{:?}", orders);
|
|
|
@@ -1080,7 +1080,7 @@ pub fn run_strategy(quant_arc: Arc<Mutex<Quant>>) -> JoinHandle<()>{
|
|
|
// 触发策略 更新策略时间
|
|
|
quant.strategy.local_time = Utc::now().timestamp_millis();
|
|
|
let trade_msg = quant.trade_msg.clone();
|
|
|
- let platform_rest_fb = quant.platform_rest.clone_box();
|
|
|
+ let mut platform_rest_fb = quant.platform_rest.clone_box();
|
|
|
// 获取信号
|
|
|
if quant.mode_signal > 20 {
|
|
|
// 先执行onExit
|
|
|
@@ -1115,7 +1115,7 @@ pub fn run_strategy(quant_arc: Arc<Mutex<Quant>>) -> JoinHandle<()>{
|
|
|
}
|
|
|
pub async fn run_transaction(quant_arc: Arc<Mutex<Quant>>, name: String, symbols: Vec<String>, exchange_params: BTreeMap<String, String>) {
|
|
|
let (tx, mut rx) = channel(100);
|
|
|
- let gate_exc = GateSwapRest::new(false, exchange_params.clone());
|
|
|
+ let mut gate_exc = GateSwapRest::new(false, exchange_params.clone());
|
|
|
// 获取user_id
|
|
|
let res_data = gate_exc.wallet_fee().await;
|
|
|
info!(?res_data);
|