Commit 44c746aa by rongjun

bug

parent 1b1498c2
......@@ -66,8 +66,8 @@ class BiboxCollector extends BaseCollector{
// restSymbols.push(symbol);
// }
// }
const perInterval = 6;
const totalInterval = perInterval * restSymbols.length+50;
const perInterval = 10;
const totalInterval = perInterval * restSymbols.length;
setInterval(()=>{
const sortedSymbols = restSymbols.sort(()=>{
return Math.random()>0.5
......@@ -121,7 +121,7 @@ class BiboxCollector extends BaseCollector{
return symbolDetail.pair;
}
getFeeRate(fromCurrency,toCurrency){
return 0;
return 0.001;
}
processAmount(fromCurrency,toCurrency,amount){
//有可能会由于数值过小,传进来的amount被表示为科学计数法法
......@@ -141,8 +141,9 @@ class BiboxCollector extends BaseCollector{
return price;
}
getCurrencyMaxReturnAmount(currency){
const balance = this.getCurrencyBalance(currency);
return Math.min(Strategy3MaxAmountMap[currency],balance);
return Strategy3MaxAmountMap[currency];
// const balance = this.getCurrencyBalance(currency);
// return Math.min(Strategy3MaxAmountMap[currency],balance);
}
getDepthPrintStr(fromCurrency,toCurrency,depth=1){
return super.getDepthPrintStr(fromCurrency,toCurrency,3);
......
......@@ -244,6 +244,7 @@ class Strategy3 {
const buyFirst = result[9];
if (totalMarginRate > this._getMinMargin()) {
console.log(`发现利差:${totalMarginRate},buyDepth:${buyDepth},sellDepth${sellDepth},returnDepth${returnDepth}`);
return -1;
return [baseCurrency1, midCurrency, baseCurrency2, totalMarginRate, buyPrice, sellPrice, returnPrice, amount, returnAmount, rawBuyPrice, rawSellPrice, rawReturnPrice, buyFirst];
}
}
......
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