Commit f784c04c authored by Ahmad Nemati's avatar Ahmad Nemati

git pu

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