From 184a3087b1b0d4f0594b4fe84b159e2ca9330460 Mon Sep 17 00:00:00 2001 From: Piyush Dixit <79581397+PiyushDixit96@users.noreply.github.com> Date: Mon, 10 May 2021 21:22:12 +0530 Subject: Update index.js --- index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'index.js') diff --git a/index.js b/index.js index 7d77002..378cb8b 100644 --- a/index.js +++ b/index.js @@ -62,7 +62,7 @@ function process_data(data) { if (data.eventType === 'executionReport') { if (data.executionType === 'NEW') { if (data.orderStatus === 'NEW') { - txt = `✅ ✅ ✅\nSpot Order CREATED\nSide: ${data.side}\nSymbol: #${data.symbol}\nPrice: ${fixFloat(data.price)}\nQuantity: ${fixFloat(data.quantity)}\nOrder ID: #ID${data.orderId}` + txt = `💸 💸 💸\nSpot Order CREATED\nSide: ${data.side}\nSymbol: #${data.symbol}\nPrice: ${fixFloat(data.price)}\nQuantity: ${fixFloat(data.quantity)}\nOrder ID: #ID${data.orderId}` } else if (data.orderStatus === 'REJECTED') { txt = `🚫 🚫 🚫\nSpot Order REJECTED\nSide: ${data.side}\nSymbol: #${data.symbol}\nPrice: ${fixFloat(data.price)}\nQuantity: ${fixFloat(data.quantity)}\nOrder ID: #ID${data.orderId}` @@ -73,12 +73,12 @@ function process_data(data) { } } else if (data.executionType === 'TRADE') { if (data.orderStatus === 'PARTIALLY_FILLED') { - txt = `💰\nSpot Order PARTIALLY FILLED\nSide: ${data.side}\nSymbol: #${data.symbol}\nPrice: ${fixFloat(data.price)}\nLast Filled: ${fixFloat(data.lastTradeQuantity)}\nRemaining: ${fixFloat(Number(data.quantity) - Number(data.accumulatedQuantity))}\nOrder ID: #ID${data.orderId}` + txt = `💰 💰 💰\nSpot Order PARTIALLY FILLED\nSide: ${data.side}\nSymbol: #${data.symbol}\nPrice: ${fixFloat(data.price)}\nLast Filled: ${fixFloat(data.lastTradeQuantity)}\nRemaining: ${fixFloat(Number(data.quantity) - Number(data.accumulatedQuantity))}\nOrder ID: #ID${data.orderId}` } else if (data.orderStatus === 'FILLED') { - txt = `💰 💰 💰\nSpot Order FULLY FILLED\nSide: ${data.side}\nSymbol: #${data.symbol}\nPrice: ${fixFloat(data.price)}\nFilled: ${fixFloat(data.accumulatedQuantity)}\nOrder ID: #ID${data.orderId}` + txt = `✅ ✅ ✅\nSpot Order FULLY FILLED\nSide: ${data.side}\nSymbol: #${data.symbol}\nPrice: ${fixFloat(data.price)}\nFilled: ${fixFloat(data.accumulatedQuantity)}\nOrder ID: #ID${data.orderId}` } } else if (['REPLACED', 'EXPIRED', 'PENDING_CANCEL'].includes(data.orderStatus)) { - txt = `🚫 🚫 🚫\nSpot Order ${data.orderStatus}\nSide: ${data.side}\nSymbol: #${data.symbol}\nPrice: ${fixFloat(data.price)}\nQuantity: ${fixFloat(data.quantity)}\nOrder ID: #ID${data.orderId}` + txt = `🔴 🟡 🔵\nSpot Order ${data.orderStatus}\nSide: ${data.side}\nSymbol: #${data.symbol}\nPrice: ${fixFloat(data.price)}\nQuantity: ${fixFloat(data.quantity)}\nOrder ID: #ID${data.orderId}` } else { txt = `⚠️ ⚠️ ⚠️\nUndefined\nExecution Type: ${data.executionType}\nOrder Status ${data.orderStatus}\nFull Details:\n${msg}` } -- cgit v1.2.3