|
|
@@ -204,16 +204,18 @@ impl HtxSwapWs {
|
|
|
//订阅信息生成
|
|
|
pub fn get_subscription(&self) -> Vec<Value> {
|
|
|
let mut args = vec![];
|
|
|
- // 只获取第一个
|
|
|
- let symbol = self.symbol_s.get(0).unwrap().replace("_", "-");
|
|
|
-
|
|
|
- for subscribe_type in &self.subscribe_types {
|
|
|
- let ty_str = Self::enum_to_string(symbol.clone(),
|
|
|
- subscribe_type.clone(),
|
|
|
- self.login_param.clone(),
|
|
|
- );
|
|
|
- args.push(ty_str);
|
|
|
+
|
|
|
+ for symbol in &self.symbol_s {
|
|
|
+ let s = symbol.replace("_", "-");
|
|
|
+ for subscribe_type in &self.subscribe_types {
|
|
|
+ let ty_str = Self::enum_to_string(s.clone(),
|
|
|
+ subscribe_type.clone(),
|
|
|
+ self.login_param.clone(),
|
|
|
+ );
|
|
|
+ args.push(ty_str);
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
args
|
|
|
}
|
|
|
|