From f56baee03464a2badc1676fa6e446f8001dab7ed Mon Sep 17 00:00:00 2001
From: Piyush Dixit <79581397+PiyushDixit96@users.noreply.github.com>
Date: Sun, 23 May 2021 02:01:10 +0530
Subject: Update index.js
---
index.js | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/index.js b/index.js
index a06b357..63f91b2 100644
--- a/index.js
+++ b/index.js
@@ -96,21 +96,21 @@ function process_data(data) {
if (orderType === "MARKET") {
txt = txt = `🚫 🚫 🚫\nSpot ${orderType} ${side} Order CREATED\nSymbol: #${symbol}\nQuantity: ${fixFloat(quantity)}\nOrder ID: #ID${orderId}\nOrder reject reason: #ID${Order_reject_reason}`
}else {
- txt = `🚫 🚫 🚫\nSpot ${orderType} ${side} Order REJECTED\nSymbol: #${symbol}\nPrice: ${price}\nQuantity: ${fixFloat(quantity)}\nTotal: ${total}\nOrder ID: #ID${orderId}\nOrder reject reason: #ID${Order_reject_reason}`
+ txt = `🚫 🚫 🚫\nSpot ${orderType} ${side} Order REJECTED\nSymbol: #${symbol}\nPrice: ${price}\nQuantity: ${fixFloat(quantity)}${total}\nOrder ID: #ID${orderId}\nOrder reject reason: #ID${Order_reject_reason}`
}
}
} else if (executionType === 'CANCELED') {
if (orderStatus === 'CANCELED') {
- txt = `❎ ❎ ❎\nSpot ${side} Order CANCELED\nSymbol: #${symbol}\nPrice: ${price}\nQuantity: ${fixFloat(quantity)}\nTotal: ${total}\nOrder ID: #ID${orderId}`
+ txt = `❎ ❎ ❎\nSpot ${orderType} ${side} Order CANCELED\nSymbol: #${symbol}\nPrice: ${price}\nQuantity: ${fixFloat(quantity)}${total}\nOrder ID: #ID${orderId}`
}
} else if (executionType === 'TRADE') {
if (orderStatus === 'PARTIALLY_FILLED') {
- txt = `⌛ ⌛ ⌛\nSpot ${side} Order PARTIALLY FILLED\nSymbol: #${symbol}\nPrice: ${price}\nLast Filled: ${fixFloat(lastTradeQuantity)}\nRemaining: ${fixFloat(Number(quantity) - Number(Cumulative_filled_quantity))}\nTotal: ${total}\nOrder ID: #ID${orderId}`
+ txt = `⌛ ⌛ ⌛\nSpot ${orderType} ${side} Order PARTIALLY FILLED\nSymbol: #${symbol}\nPrice: ${price}\nLast Filled: ${fixFloat(lastTradeQuantity)}\nTotal Filled: ${fixFloat(Cumulative_filled_quantity)}\nRemaining: ${fixFloat(Number(quantity) - Number(Cumulative_filled_quantity))}\nOrder ID: #ID${orderId}`
} else if (orderStatus === 'FILLED') {
- txt = `💰 💰 💰\nSpot ${side} Order FULLY FILLED\nSymbol: #${symbol}\nPrice: ${price}\nFilled: ${fixFloat(Cumulative_filled_quantity)}\nTotal: ${total}\nOrder ID: #ID${orderId}`
+ txt = `💰 💰 💰\nSpot ${orderType} ${side} Order FULLY FILLED\nSymbol: #${symbol}\nPrice: ${price}\nFilled: ${fixFloat(Cumulative_filled_quantity)}${total}\nOrder ID: #ID${orderId}`
}
} else if (['REPLACED', 'EXPIRED', 'PENDING_CANCEL'].includes(orderStatus)) {
- txt = `🔴 🟡 🔵\nSpot ${side} Order ${orderStatus}\nSymbol: #${symbol}\nPrice: ${price}\nQuantity: ${fixFloat(quantity)}\nTotal: ${total}\nOrder ID: #ID${orderId}`
+ txt = `🔴 🟡 🔵\nSpot ${orderType} ${side} Order ${orderStatus}\nSymbol: #${symbol}\nPrice: ${price}\nQuantity: ${fixFloat(quantity)}${total}\nOrder ID: #ID${orderId}`
} else {
txt = `⚠️ ⚠️⚠️\nUndefined\nExecution Type: ${executionType}\nOrder Status ${orderStatus}\nFull Details:\n${data}`
}
--
cgit v1.2.3