Переглянути джерело

bitmart bug ,服务器时间接口

hl 1 рік тому
батько
коміт
aac6960d06
1 змінених файлів з 3 додано та 13 видалено
  1. 3 13
      exchanges/src/bitmart_swap_rest.rs

+ 3 - 13
exchanges/src/bitmart_swap_rest.rs

@@ -71,11 +71,7 @@ impl BitMartSwapRest {
     }
 
     //深度
-    pub async fn get_depth(&mut self, symbol: String) -> ResponseData {
-        let params = json!({
-            "symbol":symbol
-        });
-
+    pub async fn get_depth(&mut self, params: Value) -> ResponseData {
         let data = self.request("GET".to_string(),
                                 "/contract".to_string(),
                                 format!("/public/depth"),
@@ -86,10 +82,7 @@ impl BitMartSwapRest {
     }
 
     //获取所有合约详情
-    pub async fn get_market(&mut self, symbol: String) -> ResponseData {
-        let params = json!({
-            "symbol":symbol
-        });
+    pub async fn get_market(&mut self, params: Value) -> ResponseData {
         let data = self.request("GET".to_string(),
                                 "/contract".to_string(),
                                 format!("/public/details"),
@@ -112,10 +105,7 @@ impl BitMartSwapRest {
     }
 
     //用户仓位列表(查询仓位详情 (KEYED))
-    pub async fn get_user_position(&mut self, symbol: String) -> ResponseData {
-        let params = json!({
-            "symbol":symbol
-        });
+    pub async fn get_user_position(&mut self, params: Value) -> ResponseData {
         let data = self.request("GET".to_string(),
                                 "/contract".to_string(),
                                 format!("/private/position"),