Commit 852d5481 by zihan

调整下卖单的时间

parent e0c2ec51
...@@ -85,7 +85,9 @@ class BiboxStrategy3 extends Strategy3 { ...@@ -85,7 +85,9 @@ class BiboxStrategy3 extends Strategy3 {
console.log("买入全部成交"); console.log("买入全部成交");
createdBuyOrder = true; createdBuyOrder = true;
amount = collector.processAmount(midCurrency, baseCurrency2, parseFloat(order.executedQty*0.999)); amount = collector.processAmount(midCurrency, baseCurrency2, parseFloat(order.executedQty*0.999));
sellOrder(); setTimeout(()=>{
sellOrder();
},200);
returnOrder(); returnOrder();
} else if (parseFloat(order.executedQty) > 0) { } else if (parseFloat(order.executedQty) > 0) {
returnAmount = parseFloat(returnAmount) * parseFloat(order.executedQty) / parseFloat(amount); returnAmount = parseFloat(returnAmount) * parseFloat(order.executedQty) / parseFloat(amount);
...@@ -95,7 +97,9 @@ class BiboxStrategy3 extends Strategy3 { ...@@ -95,7 +97,9 @@ class BiboxStrategy3 extends Strategy3 {
order.remark = "部分成交@amount " + order.executedQty + ";"; order.remark = "部分成交@amount " + order.executedQty + ";";
createdBuyOrder = true; createdBuyOrder = true;
if (parseFloat(amount) > 0) if (parseFloat(amount) > 0)
sellOrder(); setTimeout(()=>{
sellOrder();
})
if (parseFloat(returnAmount) > 0) if (parseFloat(returnAmount) > 0)
returnOrder(); returnOrder();
else { else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment