|
@@ -88,11 +88,13 @@ async fn rest_sub_accounnt() {
|
|
|
let _guard = global::log_utils::init_log_with_info();
|
|
let _guard = global::log_utils::init_log_with_info();
|
|
|
|
|
|
|
|
let mut ret = get_rest();
|
|
let mut ret = get_rest();
|
|
|
- // let response = ret.sub_account().await;
|
|
|
|
|
- //
|
|
|
|
|
- // let accounts = response.data;
|
|
|
|
|
- //
|
|
|
|
|
- // let accounts_array = accounts.as_array().unwrap();
|
|
|
|
|
|
|
+ let response = ret.sub_account().await;
|
|
|
|
|
+
|
|
|
|
|
+ let accounts = response.data;
|
|
|
|
|
+
|
|
|
|
|
+ let accounts_array = accounts.as_array().unwrap();
|
|
|
|
|
+
|
|
|
|
|
+ // g2024002~g2024101获取方法
|
|
|
// for i in 0..accounts_array.len() {
|
|
// for i in 0..accounts_array.len() {
|
|
|
// let account = &accounts_array[i];
|
|
// let account = &accounts_array[i];
|
|
|
// let remark = account.get("remark").unwrap().as_str().unwrap();
|
|
// let remark = account.get("remark").unwrap().as_str().unwrap();
|
|
@@ -107,11 +109,27 @@ async fn rest_sub_accounnt() {
|
|
|
// //
|
|
// //
|
|
|
// // info!("{},{},{}", remark, key, secret)
|
|
// // info!("{},{},{}", remark, key, secret)
|
|
|
// }
|
|
// }
|
|
|
- let create_rst = ret.create_keys(12574400).await;
|
|
|
|
|
- let key = create_rst.data.get("key").unwrap().as_str().unwrap();
|
|
|
|
|
- let secret = create_rst.data.get("secret").unwrap().as_str().unwrap();
|
|
|
|
|
|
|
|
|
|
- info!("{},{},{}", "gate111", key, secret)
|
|
|
|
|
|
|
+ // gate111-gate290获取方法
|
|
|
|
|
+ for i in 110..290 {
|
|
|
|
|
+ let account = &accounts_array[i];
|
|
|
|
|
+ // let remark = account.get("remark").unwrap().as_str().unwrap();
|
|
|
|
|
+ // let login_name = account.get("login_name").unwrap().as_str().unwrap();
|
|
|
|
|
+ let user_id = account.get("user_id").unwrap().as_i64().unwrap();
|
|
|
|
|
+
|
|
|
|
|
+ // info!("{},{},{}", i, remark, user_id);
|
|
|
|
|
+
|
|
|
|
|
+ let create_rst = ret.create_keys(user_id).await;
|
|
|
|
|
+ let key = create_rst.data.get("key").unwrap().as_str().unwrap();
|
|
|
|
|
+ let secret = create_rst.data.get("secret").unwrap().as_str().unwrap();
|
|
|
|
|
+
|
|
|
|
|
+ info!("{},{},{}", format!("gate{}",i+1), key, secret)
|
|
|
|
|
+ }
|
|
|
|
|
+ // let create_rst = ret.create_keys(12574400).await;
|
|
|
|
|
+ // let key = create_rst.data.get("key").unwrap().as_str().unwrap();
|
|
|
|
|
+ // let secret = create_rst.data.get("secret").unwrap().as_str().unwrap();
|
|
|
|
|
+ //
|
|
|
|
|
+ // info!("{},{},{}", "gate111", key, secret)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// fn get_ws(btree_map: Option<GateSwapLogin>) -> GateSwapWs {
|
|
// fn get_ws(btree_map: Option<GateSwapLogin>) -> GateSwapWs {
|