瀏覽代碼

参数 调整

hl 1 年之前
父節點
當前提交
926699a564
共有 3 個文件被更改,包括 26 次插入24 次删除
  1. 9 9
      exchanges/src/bitget_spot_rest.rs
  2. 3 2
      exchanges/src/kucoin_swap_rest.rs
  3. 14 13
      exchanges/src/okx_swap_rest.rs

+ 9 - 9
exchanges/src/bitget_spot_rest.rs

@@ -105,7 +105,7 @@ impl BitgetSpotRest {
         let data = self.request("GET".to_string(),
                                 "/api/v2".to_string(),
                                 "/spot/public/coins".to_string(),
-                                true,
+                                false,
                                 params.to_string(),
         ).await;
         data
@@ -118,7 +118,7 @@ impl BitgetSpotRest {
         let data = self.request("GET".to_string(),
                                 "/api/v2".to_string(),
                                 "/spot/public/symbols".to_string(),
-                                true,
+                                false,
                                 params.to_string(),
         ).await;
         data
@@ -130,7 +130,7 @@ impl BitgetSpotRest {
         let data = self.request("GET".to_string(),
                                 "/api/v2".to_string(),
                                 "/spot/market/vip-fee-rate".to_string(),
-                                true,
+                                false,
                                 params.to_string(),
         ).await;
         data
@@ -143,7 +143,7 @@ impl BitgetSpotRest {
         let data = self.request("GET".to_string(),
                                 "/api/v2".to_string(),
                                 "/spot/market/tickers".to_string(),
-                                true,
+                                false,
                                 params.to_string(),
         ).await;
         data
@@ -156,7 +156,7 @@ impl BitgetSpotRest {
         let data = self.request("GET".to_string(),
                                 "/api/v2".to_string(),
                                 "/spot/market/merge-depth".to_string(),
-                                true,
+                                false,
                                 params.to_string(),
         ).await;
         data
@@ -187,7 +187,7 @@ impl BitgetSpotRest {
         let data = self.request("GET".to_string(),
                                 "/api/v2".to_string(),
                                 "/spot/market/candles".to_string(),
-                                true,
+                                false,
                                 params.to_string(),
         ).await;
         data
@@ -203,7 +203,7 @@ impl BitgetSpotRest {
         let data = self.request("GET".to_string(),
                                 "/api/v2".to_string(),
                                 "/spot/market/history-candles".to_string(),
-                                true,
+                                false,
                                 params.to_string(),
         ).await;
         data
@@ -217,7 +217,7 @@ impl BitgetSpotRest {
         let data = self.request("GET".to_string(),
                                 "/api/v2".to_string(),
                                 "/spot/market/fills".to_string(),
-                                true,
+                                false,
                                 params.to_string(),
         ).await;
         data
@@ -240,7 +240,7 @@ impl BitgetSpotRest {
         let data = self.request("GET".to_string(),
                                 "/api/v2".to_string(),
                                 "/spot/market/fills-history".to_string(),
-                                true,
+                                false,
                                 params.to_string(),
         ).await;
         data

+ 3 - 2
exchanges/src/kucoin_swap_rest.rs

@@ -60,6 +60,7 @@ impl KucoinSwapRest {
     /*******************************************************************************************************/
     /*****************************************rest请求函数********************************************************/
     /*******************************************************************************************************/
+    // 服务器时间
     pub async fn get_server_time(&mut self) -> ResponseData {
         let params = serde_json::json!({
          });
@@ -154,7 +155,7 @@ impl KucoinSwapRest {
         let data = self.request("GET".to_string(),
                                 "/api/v1".to_string(),
                                 format!("/ticker"),
-                                true,
+                                false,
                                 params.to_string(),
         ).await;
         data
@@ -353,7 +354,7 @@ impl KucoinSwapRest {
         let data = self.request("GET".to_string(),
                                 "/api/v1".to_string(),
                                 format!("/contracts/risk-limit/{}", symbol),
-                                true,
+                                false,
                                 params.to_string(),
         ).await;
         data

+ 14 - 13
exchanges/src/okx_swap_rest.rs

@@ -60,7 +60,19 @@ impl OkxSwapRest {
     /*******************************************************************************************************/
     /*****************************************rest请求函数********************************************************/
     /*******************************************************************************************************/
-    //获取订单信息
+    //获取系统时间
+    pub async fn get_server_time(&mut self) -> ResponseData {
+        let params = serde_json::json!({
+         });
+        let data = self.request("GET".to_string(),
+                                "/api/v5".to_string(),
+                                "/public/time".to_string(),
+                                false,
+                                params.to_string(),
+        ).await;
+        data
+    }
+     //获取订单信息
     pub async fn get_order(&mut self, symbol: String, ord_id: String, cl_ord_id: String) -> ResponseData {
         let mut params = serde_json::json!({
             "instId":symbol
@@ -92,18 +104,7 @@ impl OkxSwapRest {
         ).await;
         data
     }
-    //获取系统时间
-    pub async fn get_server_time(&mut self) -> ResponseData {
-        let params = serde_json::json!({
-         });
-        let data = self.request("GET".to_string(),
-                                "/api/v5".to_string(),
-                                "/public/time".to_string(),
-                                false,
-                                params.to_string(),
-        ).await;
-        data
-    }
+
     //查看持仓信息
     pub async fn get_positions(&mut self, inst_type: String) -> ResponseData {
         let mut params = serde_json::json!({