Commit 99595ca7 by zihan

手续费调整

parent 1d740a3a
...@@ -50,35 +50,6 @@ class KucoinCollector extends BaseCollector{ ...@@ -50,35 +50,6 @@ class KucoinCollector extends BaseCollector{
// this._fetchDepthByRest(symbols,subscribeDepth,callback); // this._fetchDepthByRest(symbols,subscribeDepth,callback);
// },20000); // },20000);
} }
_fetchDepthByRest(symbols,depth,callback){
const restSymbols = symbols;
const perInterval = 60;
const totalInterval = perInterval * restSymbols.length +100;
setInterval(()=>{
const sortedSymbols = restSymbols.sort(()=>{
return Math.random()>0.5
});
for(let i=0;i<sortedSymbols.length;i++){
const symbol = sortedSymbols[i];
const ipAddress = IPs[i%IPs.length];
setTimeout(()=>{
this.api.getOrderbook(symbol,depth,ipAddress,(error,result)=>{
if(error){
console.error("get depth by rest error:");
console.error(error);
return;
}
const data = result.data;
const timeStamp = data.timestamp;
callback(data.SELL.slice(0,depth).map((item)=>[item[0],item[1]]),data.BUY.slice(0,depth).map((item)=>[item[0],item[1]]),symbol,timeStamp);
// totalOrderbook[symbol]={asks:data.SELL,bids:data.BUY};
});
},i*perInterval);
}
},totalInterval);
}
_fetchDepthByWebsocket(symbols, depth, callback){ _fetchDepthByWebsocket(symbols, depth, callback){
function subsCallback(error,result){ function subsCallback(error,result){
if(error){ if(error){
...@@ -129,7 +100,8 @@ class KucoinCollector extends BaseCollector{ ...@@ -129,7 +100,8 @@ class KucoinCollector extends BaseCollector{
return symbolDetail.symbol; return symbolDetail.symbol;
} }
getFeeRate(fromCurrency,toCurrency){ getFeeRate(fromCurrency,toCurrency){
return 0.0007; // return 0.0007;
return 0.001;
} }
processAmount(fromCurrency,toCurrency,amount){ processAmount(fromCurrency,toCurrency,amount){
const detail = this._getSymbolDetail(fromCurrency,toCurrency); const detail = this._getSymbolDetail(fromCurrency,toCurrency);
......
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