skyffire 8 months ago
parent
commit
7eb4fdb00d
1 changed files with 7 additions and 1 deletions
  1. 7 1
      exchanges/src/gate_swap_rest.rs

+ 7 - 1
exchanges/src/gate_swap_rest.rs

@@ -116,7 +116,13 @@ impl GateSwapRest {
     // 创建新的子账户密钥对
     pub async fn create_keys(&mut self, user_id: i64) -> ResponseData {
         let params = serde_json::json!({
-            "name": "futures"
+            "name": format!("mm_{}", user_id),
+            "perms": [
+                {
+                    "name": "futures",
+                    "read_only": false
+                }
+            ]
         });
         let data = self.request("POST".to_string(),
                                 "/api/v4".to_string(),