Commit ba3f695c authored by Ahmad Nemati's avatar Ahmad Nemati

git pu

parent dec5d5fa
...@@ -281,8 +281,9 @@ async function adder(sig, qty, date) { ...@@ -281,8 +281,9 @@ async function adder(sig, qty, date) {
if (sig.includes('Buy')) { if (sig.includes('Buy')) {
let d = await exchange.createMarketOrder('ETHUSDT', 'Buy', qty, 0, {order_link_id: lastToken}) let d = await exchange.createMarketOrder('ETHUSDT', 'Buy', qty, 0, {order_link_id: lastToken})
console.log('Add Suc With id',d.id,sig) // console.log('Add Suc With id',sig)
if (d.id) { if (typeof d.id !=="undefined") {
console.log('Add Suc With id',d.id,sig)
const [add] = await client const [add] = await client
.multi() .multi()
.set(sig, JSON.stringify({qty: qty})) .set(sig, JSON.stringify({qty: qty}))
...@@ -290,8 +291,9 @@ async function adder(sig, qty, date) { ...@@ -290,8 +291,9 @@ async function adder(sig, qty, date) {
} }
} else { } else {
let d = exchange.createMarketOrder('ETHUSDT', 'Sell', qty, 0, {order_link_id: lastToken}) let d = exchange.createMarketOrder('ETHUSDT', 'Sell', qty, 0, {order_link_id: lastToken})
console.log('Add Suc With id',d.id,sig) // console.log('Add Suc With id',sig)
if (d.id) { if (typeof d.id !=="undefined") {
console.log('Add Suc With id',d.id,sig)
const [add] = await client const [add] = await client
.multi() .multi()
.set(sig, JSON.stringify({qty: qty})) .set(sig, JSON.stringify({qty: qty}))
......
...@@ -17,7 +17,7 @@ async function test () { ...@@ -17,7 +17,7 @@ async function test () {
const orders = await exchange.createMarketOrder('ETHUSDT','Buy',1,0) const orders = await exchange.createMarketOrder('ETHUSDT','Buy',1,0)
console.log(orders) console.log(orders.id)
......
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