Commit f784c04c authored by Ahmad Nemati's avatar Ahmad Nemati

git pu

parent ce138cbf
...@@ -313,7 +313,7 @@ async function adder(sig, qty, date) { ...@@ -313,7 +313,7 @@ async function adder(sig, qty, date) {
console.log('Suc Exchange id',d.id,sig) console.log('Suc Exchange 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: d.amount,price:d.price}))
.exec(); .exec();
} }
} else { } else {
...@@ -323,7 +323,7 @@ async function adder(sig, qty, date) { ...@@ -323,7 +323,7 @@ async function adder(sig, qty, date) {
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(sig, JSON.stringify({qty: qty})) .set(sig, JSON.stringify({qty: d.amount,price:d.price}))
.exec(); .exec();
} }
} }
......
...@@ -32,12 +32,26 @@ async function init() { ...@@ -32,12 +32,26 @@ async function init() {
async function test () { async function test () {
// let d = await exchange.createMarketOrder('ETHUSDT', 'Buy', 0.05, 0) let d = await exchange.createMarketOrder('ETHUSDT', 'Sell', 0.01, 0)
let s=await exchange.fetchOrders('ETHUSDT')
console.log(s)
// console.log('Add Suc With id',sig) // console.log('Add Suc With id',sig)
//console.log(d) console.log(d)
// const [add] = await client
// .multi()
// .set(sig, JSON.stringify({qty: d.,price:d.price}))
// .exec();
// if (typeof d.id !== "undefined") {
// console.log('Add Suc With id', d.id, 'sell')
// const [add] = await client
// .multi()
// .set('sell', JSON.stringify({qty: 0.1}))
// .exec();
//
//
// // log (asTable (orders.map (order => ccxt.omit (order, [ 'timestamp', 'info' ]))))
//
// // const order = await exchange.fetchOrder (orders[0]['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