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

git pull

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