Browse Source

coinex 余额推送格式化删除浮盈计算和一些debug打印

JiahengHe 1 year ago
parent
commit
fea79b5ae3

+ 1 - 1
standard/src/coinex_swap.rs

@@ -649,7 +649,7 @@ impl Platform for CoinexSwap {
                         // self_clone.order_sender.send(order).await.unwrap();
                     }
                     Err(error) => {
-                        info!("撤单失败:{:?}", error.to_string());
+                        // info!("撤单失败:{:?}", error.to_string());
                         // 取消失败去查订单。
                         let query_rst = self_clone.get_order_detail(&order_id, &custom_id).await;
                         match query_rst {

+ 2 - 2
standard/src/coinex_swap_handle.rs

@@ -29,8 +29,8 @@ pub fn format_account_info(data: &Vec<Value>, symbol: &String) -> Account {
             let frozen_balance= Decimal::from_str(&value["frozen"].as_str().unwrap()).unwrap();
             let available_balance = Decimal::from_str(&value["available"].as_str().unwrap()).unwrap();
             let margin = Decimal::from_str(&value["margin"].as_str().unwrap()).unwrap();
-            let profit_unreal = Decimal::from_str(&value["unrealized_pnl"].as_str().unwrap()).unwrap();
-            let balance = frozen_balance + available_balance + margin + profit_unreal;
+            // let profit_unreal = Decimal::from_str(&value["unrealized_pnl"].as_str().unwrap()).unwrap();
+            let balance = frozen_balance + available_balance + margin;
             Account {
                 coin: symbol_array[1].to_string(),
                 balance,

+ 0 - 1
strategy/src/coinex_usdt_swap.rs

@@ -98,7 +98,6 @@ async fn on_data(core_arc_clone: Arc<Mutex<Core>>,
         }
         "order.update" => {
             trace_stack.set_source("coinex_swap.orders".to_string());
-            info!("coinex_usdt_swap 订单推送:{:?}", response);
             let orders = standard::handle_info::HandleSwapInfo::handle_order(CoinexSwap, response.clone(), multiplier.clone());
             let mut order_infos:Vec<OrderInfo> = Vec::new();
             for mut order in orders.order {