New filtering

This commit is contained in:
Sik Yoon 2024-01-13 04:19:47 +09:00
parent 886ee5bbee
commit c6758549f9

View File

@ -33,25 +33,29 @@ pub async fn execute_list_up_for_buy(
all_data: &AllData,
) -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
let mut task_vec = Vec::new();
let all_data_c1 = all_data.clone();
let all_data_c2 = all_data.clone();
// let all_data_c3 = all_data.clone();
let all_data_c4 = all_data.clone();
let all_data_c5 = all_data.clone();
// let all_data_c5 = all_data.clone();
let all_data_c6 = all_data.clone();
// strategist_001(all_data).await?;
task_vec.push(tokio::spawn(async move {
crate::strategy_team::strategy_001::list_up_for_buy(all_data_c1).await;
}));
// strategist_002(all_data).await?;
// task_vec.push(tokio::spawn(async move {
// crate::strategy_team::strategy_003::list_up_for_buy(all_data_c3).await;
// }));
task_vec.push(tokio::spawn(async move {
crate::strategy_team::strategy_002::list_up_for_buy(all_data_c2).await;
}));
// task_vec.push(tokio::spawn(async move {
// crate::strategy_team::strategy_003::list_up_for_buy(all_data_c3).await;
// }));
task_vec.push(tokio::spawn(async move {
crate::strategy_team::strategy_004::list_up_for_buy(all_data_c4).await;
}));
task_vec.push(tokio::spawn(async move {
crate::strategy_team::strategy_005::list_up_for_buy(all_data_c5).await;
}));
// task_vec.push(tokio::spawn(async move {
// crate::strategy_team::strategy_005::list_up_for_buy(all_data_c5).await;
// }));
task_vec.push(tokio::spawn(async move {
crate::strategy_team::strategy_006::list_up_for_buy(all_data_c6).await;
}));
@ -69,20 +73,46 @@ pub async fn execute_list_up_for_sell(
exchange_info_vec: &Vec<ExchangeInfo>,
trade_fee_vec: &Vec<TradeFee>,
) -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
let all_data_c1 = all_data.clone();
let all_data_c2 = all_data.clone();
// let all_data_c3 = all_data.clone();
let all_data_c4 = all_data.clone();
let all_data_c5 = all_data.clone();
// let all_data_c5 = all_data.clone();
let all_data_c6 = all_data.clone();
let exchange_info_vec_c1 = exchange_info_vec.clone();
let exchange_info_vec_c2 = exchange_info_vec.clone();
// let exchange_info_vec_c3 = exchange_info_vec.clone();
let exchange_info_vec_c4 = exchange_info_vec.clone();
let exchange_info_vec_c5 = exchange_info_vec.clone();
// let exchange_info_vec_c5 = exchange_info_vec.clone();
let exchange_info_vec_c6 = exchange_info_vec.clone();
let trade_fee_vec_c1 = trade_fee_vec.clone();
let trade_fee_vec_c2 = trade_fee_vec.clone();
// let trade_fee_vec_c3 = trade_fee_vec.clone();
let trade_fee_vec_c4 = trade_fee_vec.clone();
let trade_fee_vec_c5 = trade_fee_vec.clone();
// let trade_fee_vec_c5 = trade_fee_vec.clone();
let trade_fee_vec_c6 = trade_fee_vec.clone();
let mut task_vec = Vec::new();
task_vec.push(tokio::spawn(async move {
crate::strategy_team::strategy_001::list_up_for_sell(
&all_data_c1,
&exchange_info_vec_c1,
&trade_fee_vec_c1,
)
.await;
}));
task_vec.push(tokio::spawn(async move {
crate::strategy_team::strategy_002::list_up_for_sell(
&all_data_c2,
&exchange_info_vec_c2,
&trade_fee_vec_c2,
)
.await;
}));
// task_vec.push(tokio::spawn(async move {
// crate::strategy_team::strategy_003::list_up_for_sell(
// &all_data_c3,
@ -101,14 +131,14 @@ pub async fn execute_list_up_for_sell(
.await;
}));
task_vec.push(tokio::spawn(async move {
crate::strategy_team::strategy_005::list_up_for_sell(
&all_data_c5,
&exchange_info_vec_c5,
&trade_fee_vec_c5,
)
.await;
}));
// task_vec.push(tokio::spawn(async move {
// crate::strategy_team::strategy_005::list_up_for_sell(
// &all_data_c5,
// &exchange_info_vec_c5,
// &trade_fee_vec_c5,
// )
// .await;
// }));
task_vec.push(tokio::spawn(async move {
crate::strategy_team::strategy_006::list_up_for_sell(