Explorar o código

买入平台币 现货时触发

JiahengHe %!s(int64=2) %!d(string=hai) anos
pai
achega
050c48f757
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      strategy/src/quant.rs

+ 6 - 0
strategy/src/quant.rs

@@ -1316,6 +1316,12 @@ impl Quant {
         self.local_cash = start_cash;
         self.local_coin = start_coin;
 
+        // 买入平台币
+        if self.exchange.contains("spot"){ // 现货
+            self.buy_token().await;
+        }
+
+
         // 清空挂单和仓位
         self.check_position().await;
         /*