skyfffire il y a 1 an
Parent
commit
0d6d05df8f

+ 0 - 1
standard/src/binance_swap.rs

@@ -362,7 +362,6 @@ impl Platform for BinanceSwap {
 
     async fn take_order_symbol(&mut self, symbol: String, ct_val: Decimal, custom_id: &str, origin_side: &str, price: Decimal, amount: Decimal) -> Result<Order, Error> {
         let symbol_format = utils::format_symbol(symbol.clone(), "");
-        let ct_val = self.market.ct_val;
         let mut params = json!({
             "newClientOrderId": custom_id.to_string(),
             "symbol": symbol_format,

+ 16 - 17
standard/src/exchange_struct_handler.rs

@@ -1,6 +1,5 @@
 use std::str::FromStr;
 use rust_decimal::{Decimal};
-use tracing::{error};
 use exchanges::response_base::ResponseData;
 use crate::exchange::ExchangeEnum;
 use crate::{binance_swap_handle, gate_swap_handle};
@@ -162,10 +161,10 @@ impl ExchangeStructHandler {
             ExchangeEnum::BinanceSwap => {
                 binance_swap_handle::handle_book_ticker(&res_data, mul)
             }
-            _ => {
-                error!("未找到该交易所!book_ticker_handle: {:?}", exchange);
-                panic!("未找到该交易所!book_ticker_handle: {:?}", exchange);
-            }
+            // _ => {
+            //     error!("未找到该交易所!book_ticker_handle: {:?}", exchange);
+            //     panic!("未找到该交易所!book_ticker_handle: {:?}", exchange);
+            // }
         }
     }
     // 处理蜡烛信息
@@ -234,10 +233,10 @@ impl ExchangeStructHandler {
             // ExchangeEnum::BybitSwap => {
             //     bybit_swap_handle::handle_account_info(res_data, symbol)
             // }
-            _ => {
-                error!("未找到该交易所!handle_account_info: {:?}", exchange);
-                panic!("未找到该交易所!handle_account_info: {:?}", exchange);
-            }
+            // _ => {
+            //     error!("未找到该交易所!handle_account_info: {:?}", exchange);
+            //     panic!("未找到该交易所!handle_account_info: {:?}", exchange);
+            // }
         }
     }
     // 处理position信息
@@ -258,10 +257,10 @@ impl ExchangeStructHandler {
             // ExchangeEnum::BybitSwap => {
             //     bybit_swap_handle::handle_position(res_data, ct_val)
             // }
-            _ => {
-                error!("暂未提供此交易所方法!handle_position:{:?}", exchange);
-                panic!("暂未提供此交易所方法!handle_position:{:?}", exchange);
-            }
+            // _ => {
+            //     error!("暂未提供此交易所方法!handle_position:{:?}", exchange);
+            //     panic!("暂未提供此交易所方法!handle_position:{:?}", exchange);
+            // }
         }
     }
     // 处理订单信息
@@ -282,10 +281,10 @@ impl ExchangeStructHandler {
             // ExchangeEnum::BybitSwap => {
             //     bybit_swap_handle::handle_order(res_data, ct_val)
             // }
-            _ => {
-                error!("暂未提供此交易所方法!order_handle:{:?}", exchange);
-                panic!("暂未提供此交易所方法!order_handle:{:?}", exchange);
-            }
+            // _ => {
+            //     error!("暂未提供此交易所方法!order_handle:{:?}", exchange);
+            //     panic!("暂未提供此交易所方法!order_handle:{:?}", exchange);
+            // }
         }
     }
 }

+ 1 - 2
standard/tests/exchange_test.rs

@@ -3,7 +3,6 @@ use std::io::{Error};
 use std::sync::Arc;
 use std::sync::atomic::AtomicBool;
 use rust_decimal::Decimal;
-use rust_decimal_macros::dec;
 use tokio::sync::mpsc::{channel, Receiver, Sender};
 use tokio::sync::Mutex;
 use tracing::{error, trace};
@@ -18,7 +17,7 @@ use exchanges::binance_swap_ws::{BinanceSwapLogin, BinanceSwapSubscribeType, Bin
 use exchanges::response_base::ResponseData;
 use standard::exchange::{Exchange, ExchangeEnum};
 // use standard::{binance_spot_handle, Order, Platform, utils};
-use standard::{binance_swap_handle, Order, Platform, utils};
+use standard::{Order, Platform, utils};
 use standard::exchange_struct_handler::ExchangeStructHandler;
 // use standard::{kucoin_handle, Order, Platform, utils};
 // use standard::{kucoin_spot_handle, Order, Platform, utils};