Commit 9d01f270 authored by Ahmad Nemati's avatar Ahmad Nemati

git pu

parent a6217f7f
const fs = require('fs')
let moment = require('moment-timezone')
let _ = require('lodash')
let pairs=''
let res
init()
......@@ -18,7 +19,9 @@ async function init() {
for (let i = 0; i < com.length; i++) {
let t = com[i].platform
t = t.split('_')
let pair = t[3].replace('USDT', '').replace('USD', '')
pairs=pair
let lp = t[4]
arr.push(found(pair, lp))
}
......@@ -34,9 +37,19 @@ async function init() {
}
console.log(header)
createRunResfileADV(header)
}
function createRunResfileADV(data) {
// console.log(data)
return new Promise(function (resolve, reject) {
fs.writeFile(pairs+'_top.csv', data, 'utf8', function (err) {
if (err) reject(err);
else resolve(data);
});
});
}
function found(pair, lp) {
......
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