Jelajahi Sumber

bybit rest新增 接口

hl 1 tahun lalu
induk
melakukan
a8c76d34b2
1 mengubah file dengan 10 tambahan dan 2 penghapusan
  1. 10 2
      exchanges/src/bybit_swap_ws.rs

+ 10 - 2
exchanges/src/bybit_swap_ws.rs

@@ -289,9 +289,9 @@ impl BybitSwapWs {
 
             if op == "auth" {
                 res_data.code = "-200".to_string();
-                res_data.message =  format!("登录{}",success_error);
+                res_data.message = format!("登录{}", success_error);
             } else if op == "subscribe" {
-                res_data.message =  format!("订阅{}",success_error);
+                res_data.message = format!("订阅{}", success_error);
                 res_data.code = "-201".to_string();
             } else {
                 res_data.code = "".to_string();
@@ -315,6 +315,14 @@ impl BybitSwapWs {
                 res_data.channel = "tickers".to_string();
             } else if channel.contains("kline") {
                 res_data.channel = "kline".to_string();
+            } else if channel.contains("position") {
+                res_data.channel = "position".to_string();
+            } else if channel.contains("execution") {
+                res_data.channel = "execution".to_string();
+            } else if channel.contains("order") {
+                res_data.channel = "order".to_string();
+            } else if channel.contains("wallet") {
+                res_data.channel = "wallet".to_string();
             } else {
                 res_data.code = "".to_string();
                 res_data.channel = "未知的频道".to_string();