Răsfoiți Sursa

价格非法判定

龚成明 2 ani în urmă
părinte
comite
64e9cc995a
1 a modificat fișierele cu 4 adăugiri și 0 ștergeri
  1. 4 0
      scripts/one-pro.js

+ 4 - 0
scripts/one-pro.js

@@ -15,6 +15,10 @@ const orderHandler = function(context, task) {
     const token = tokenMap[tokenHash]
     const pair = token.exchange.pair
 
+    // 价格非法判定
+    if (!token.BinancePrice || !token.OneInchPrice) return
+
+    // 卖出逻辑判定
     if (token.orderPrice) {
       // TODO 对接卖出交易
       if (token.BinancePrice > token.orderPrice) {