Browse Source

清仓程序增加phemex

JiahengHe 1 year ago
parent
commit
e44514139b
2 changed files with 6 additions and 2 deletions
  1. 5 1
      strategy/src/clear_core.rs
  2. 1 1
      strategy/src/core.rs

+ 5 - 1
strategy/src/clear_core.rs

@@ -18,7 +18,7 @@ use global::params::Params;
 use global::trace_stack::TraceStack;
 use standard::{Account, Market, Order, Platform, Position, PositionModeEnum, SpecialTicker};
 use standard::exchange::{Exchange};
-use standard::exchange::ExchangeEnum::{BinanceSwap, BitgetSwap, BybitSwap, CoinexSwap, GateSwap, HtxSwap, KucoinSwap};
+use standard::exchange::ExchangeEnum::{BinanceSwap, BitgetSwap, BybitSwap, CoinexSwap, GateSwap, HtxSwap, KucoinSwap, PhemexSwap};
 
 use crate::model::{LocalPosition, OrderInfo};
 use crate::predictor::Predictor;
@@ -232,6 +232,10 @@ impl ClearCore {
                 "htx_usdt_swap" => {
                     Exchange::new(HtxSwap, symbol, params.colo != 0i8, exchange_params, order_sender, error_sender).await
                 }
+                "phemex_usdt_swap" => {
+                    // standard::utils::proxy_handle(Some("phemex"));
+                    Exchange::new(PhemexSwap, symbol, params.colo != 0i8, exchange_params, order_sender, error_sender).await
+                }
                 _ => {
                     error!("203未找到对应的交易所rest枚举!");
                     panic!("203未找到对应的交易所rest枚举!");

+ 1 - 1
strategy/src/core.rs

@@ -244,7 +244,7 @@ impl Core {
                     Exchange::new(HtxSwap, symbol, params.colo != 0i8, exchange_params, order_sender, error_sender).await
                 }
                 "phemex_usdt_swap" => {
-                    standard::utils::proxy_handle(Some("phemex"));
+                    // standard::utils::proxy_handle(Some("phemex"));
                     Exchange::new(PhemexSwap, symbol, params.colo != 0i8, exchange_params, order_sender, error_sender).await
                 }
                 _ => {