Commit 07aa862f authored by Ahmad Nemati's avatar Ahmad Nemati

git pull

parent 55fb94e7
......@@ -40,7 +40,7 @@ async function init() {
})
exchange.urls['api'] = exchange.urls['test'];
// exchange.urls['api'] = exchange.urls['test'];
run()
balanceUpdater()
......@@ -287,8 +287,8 @@ async function closer(sig, date, bigData, id, pair) {
lastToken = lastToken.replace(/_/g, '').replace(/Lp/g, '').replace(/BTC/g, '').replace(/ /g, '')
const [data, delStatus] = await client
.multi()
.get(info.apiKey+sig)
.del(info.apiKey+sig)
.get(info.apiKey+'_'+sig)
.del(info.apiKey+'_'+sig)
.exec();
......@@ -375,7 +375,7 @@ async function adder(sig, qty, date, allData,pair) {
console.log('Add Suc With id', d.id, sig)
const [add] = await client
.multi()
.set(info.apiKey+sig, JSON.stringify({pair: d.info.symbol, side: d.side, qty: d.amount, price: d.price}))
.set(info.apiKey+'_'+sig, JSON.stringify({pair: d.info.symbol, side: d.side, qty: d.amount, price: d.price}))
.exec();
}
......
......@@ -161,7 +161,7 @@ async function run()
dates[i].balance=balance
}
arrDate = _.orderBy(arrDate, ['sum'])
console.log(dates)
console.log(arrNew)
console.log('Balance ->',balance-lastBalance)
let worth = (balance - lastBalance) / (arrDate[0].sum)
console.log('Worth ->',worth)
......
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