|
|
@@ -18,7 +18,7 @@ pub struct WsManager {
|
|
|
impl WsManager {
|
|
|
pub fn new(symbols: Vec<String>, data_manager_am: Arc<Mutex<DataManager>>, running: Arc<AtomicBool>) -> WsManager {
|
|
|
WsManager {
|
|
|
- symbols,
|
|
|
+ symbols: symbols[0..1].to_owned(),
|
|
|
data_manager_am,
|
|
|
running
|
|
|
}
|
|
|
@@ -48,7 +48,7 @@ impl WsManager {
|
|
|
|
|
|
// 获取当前批次的交易对
|
|
|
let current_batch_symbols = self.symbols[start_index..end_index].to_vec();
|
|
|
- info!("正在创建 [{}, {}) 的连接...", start_index, end_index);
|
|
|
+ info!("正在创建 {:?} 的连接...", current_batch_symbols);
|
|
|
|
|
|
// 这个通道主要是为了后面给这个ws发送消息
|
|
|
let (write_tx, write_rx) = futures_channel::mpsc::unbounded::<Message>();
|
|
|
@@ -60,7 +60,7 @@ impl WsManager {
|
|
|
let mut ws = MexcSpotWs::new_with_tag("Mexc".to_string(), None, MexcSpotWsType::PublicAndPrivate);
|
|
|
ws.set_subscribe(vec![
|
|
|
MexcSpotWsSubscribeType::PuFuturesRecords("Min1".to_string()),
|
|
|
- MexcSpotWsSubscribeType::PuFuturesDepth
|
|
|
+ // MexcSpotWsSubscribeType::PuFuturesDepth
|
|
|
]);
|
|
|
|
|
|
ws.set_symbols(current_batch_symbols);
|