|
|
@@ -69,15 +69,19 @@ impl GateSwapWs {
|
|
|
/*******公共频道-私有频道数据组装*/
|
|
|
let address_url = match ws_type {
|
|
|
GateSwapWsType::PublicAndPrivate(name) => {
|
|
|
- format!("wss://fx-ws.gateio.ws/v4/ws/{}", name.to_string())
|
|
|
+ if is_colo {
|
|
|
+ let url = format!("wss://fxws-privategateapi.io/v4/ws/{}", name.to_string())
|
|
|
+ info!("开启高速(未配置,走普通:{})通道",url);
|
|
|
+ url
|
|
|
+ } else {
|
|
|
+ let url = format!("wss://fx-ws.gateio.ws/v4/ws/{}", name.to_string())
|
|
|
+ info!("走普通通道:{}",address_url);
|
|
|
+ url
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- if is_colo {
|
|
|
- info!("开启高速(未配置,走普通:{})通道",address_url);
|
|
|
- } else {
|
|
|
- info!("走普通通道:{}",address_url);
|
|
|
- }
|
|
|
+
|
|
|
GateSwapWs {
|
|
|
label,
|
|
|
address_url,
|
|
|
@@ -129,13 +133,13 @@ impl GateSwapWs {
|
|
|
//订阅枚举解析
|
|
|
pub fn enum_to_string(symbol: String, subscribe_type: GateSwapSubscribeType, login_param: Option<GateSwapLogin>) -> Value {
|
|
|
let time = chrono::Utc::now().timestamp();
|
|
|
- let mut access_key = "".to_string();
|
|
|
+ let mut access_key = "".to_string();
|
|
|
let mut secret_key = "".to_string();
|
|
|
match login_param {
|
|
|
None => {}
|
|
|
Some(param) => {
|
|
|
- access_key = param.api_key.clone();
|
|
|
- secret_key = param.secret.clone();
|
|
|
+ access_key = param.api_key.clone();
|
|
|
+ secret_key = param.secret.clone();
|
|
|
}
|
|
|
}
|
|
|
|