|
|
@@ -977,18 +977,22 @@ impl Quant {
|
|
|
error!("清空挂单异常: {}", e);
|
|
|
}
|
|
|
};
|
|
|
+ match self.platform_rest.cancel_orders_all() {
|
|
|
+ Ok(val)=>{
|
|
|
+ info!("清空所有挂单,{:?}", val);
|
|
|
+ },
|
|
|
+ Err(err)=>{
|
|
|
+ error!("取消所有订单异常: {}",err)
|
|
|
+ }
|
|
|
+ }
|
|
|
info!("检查遗漏仓位!");
|
|
|
match self.platform_rest.get_positions().await {
|
|
|
Ok(val)=>{
|
|
|
for position in val {
|
|
|
- // if !position.symbol.eq_ignore_ascii_case(self.symbol.as_str()){
|
|
|
- // continue;
|
|
|
- // }
|
|
|
|
|
|
if position.amount.eq(&Decimal::ZERO) {
|
|
|
continue;
|
|
|
}
|
|
|
-
|
|
|
match self.platform_rest.get_ticker_symbol(position.symbol.clone()).await {
|
|
|
Ok(ticker)=>{
|
|
|
let ap = ticker.sell;
|