|
|
@@ -1118,12 +1118,13 @@ pub async fn run_transaction(quant_arc: Arc<Mutex<Quant>>, name: String, symbols
|
|
|
let mut gate_exc = GateSwapRest::new(false, exchange_params.clone());
|
|
|
// 获取user_id
|
|
|
let res_data = gate_exc.wallet_fee().await;
|
|
|
- info!(?res_data);
|
|
|
if res_data.code != "200"{
|
|
|
error!("获取gate交易所参数 user_id 失败, 交易交易所启动失败!");
|
|
|
+ info!(?res_data);
|
|
|
return;
|
|
|
}
|
|
|
let wallet_obj :Value = serde_json::from_str(&res_data.data).unwrap();
|
|
|
+ info!(?wallet_obj);
|
|
|
let user_id = wallet_obj["user_id"].to_string();
|
|
|
let symbols_one = symbols.clone();
|
|
|
// 获取乘数(计价货币兑换为结算货币的乘数)
|
|
|
@@ -1147,7 +1148,13 @@ pub async fn run_transaction(quant_arc: Arc<Mutex<Quant>>, name: String, symbols
|
|
|
tokio::spawn( async move {
|
|
|
let mut gate_exc = GateSwapWs::new_label(name, false, exchange_params,
|
|
|
GateWsType::PublicAndPrivate("usdt".to_string()), tx);
|
|
|
- gate_exc.set_subscribe(vec![GateSubscribeType::PuFuturesTrades, GateSubscribeType::PuFuturesOrderBook]);
|
|
|
+ gate_exc.set_subscribe(vec![
|
|
|
+ GateSubscribeType::PuFuturesTrades,
|
|
|
+ GateSubscribeType::PuFuturesOrderBook,
|
|
|
+ GateSubscribeType::PrFuturesOrders(user_id.clone()),
|
|
|
+ GateSubscribeType::PrFuturesPositions(user_id.clone()),
|
|
|
+ GateSubscribeType::PrFuturesBalances(user_id.clone()),
|
|
|
+ ]);
|
|
|
gate_exc.custom_subscribe(symbols_one.clone()).await;
|
|
|
});
|
|
|
|