Browse Source

再次测试

skyffire 8 months ago
parent
commit
f3b876204d
2 changed files with 13 additions and 10 deletions
  1. 9 1
      exchanges/src/gate_swap_rest.rs
  2. 4 9
      exchanges/tests/gate_swap_test.rs

+ 9 - 1
exchanges/src/gate_swap_rest.rs

@@ -121,7 +121,15 @@ impl GateSwapRest {
                 {
                     "name": "futures",
                     "read_only": false
-                }
+                },
+                {
+                    "name": "wallet",
+                    "read_only": false
+                },
+                {
+                    "name": "account",
+                    "read_only": false
+                },
             ]
         });
         let data = self.request("POST".to_string(),

+ 4 - 9
exchanges/tests/gate_swap_test.rs

@@ -53,13 +53,7 @@ async fn price_order_test() {
     });
 
     let response_data = rest.place_price_order("usdt".to_string(), params).await;
-    if response_data.code == 200 {
-        // let response_obj: serde_json::Value = serde_json::from_str(response_data.data.as_str()).unwrap();
-        //
-        // info!("resp={:?}", response_obj.as_object().unwrap());
-    } else {
-        // error!(?response_data);
-    }
+    info!("resp={:?}", response_data.data.to_string());
 }
 
 #[tokio::test]
@@ -79,8 +73,9 @@ async fn rest_account_book_test() {
     let _guard = global::log_utils::init_log_with_trace();
 
     let mut ret = get_rest();
-    let req_data = ret.account_book("usdt".to_string()).await;
-    println!("okx--查询合约账户变更历史--{:?}", req_data);
+    let req_data = ret.wallet_fee().await;
+    // let req_data = ret.account_book("usdt".to_string()).await;
+    info!("okx--查询合约账户变更历史--{:?}", req_data);
 }
 
 //rest-查询子账户列表