aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiyush Dixit <79581397+PiyushDixit96@users.noreply.github.com>2021-05-21 07:17:53 +0530
committerGitHub <noreply@github.com>2021-05-21 07:17:53 +0530
commit127da47a8a83182e080e417c931efacddf54b3d6 (patch)
treebe45524895acfe2f1df511a164b044469d04b474
parent239868d123d1c61f3b75c4bb2fb626f444e111c7 (diff)
Update index.js
-rw-r--r--index.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/index.js b/index.js
index 34205a0..fc94a9f 100644
--- a/index.js
+++ b/index.js
@@ -88,24 +88,24 @@ function process_data(data) {
}
if (executionType === 'NEW') {
if (orderStatus === 'NEW') {
- txt = `💸 💸 💸\n<b>Spot ${side} Order CREATED</b>\n<b>Symbol:</b> #${symbol}\n<b>Price:</b> ${price}\n<b>Quantity:</b> ${fixFloat(quantity)}\n<b>Total:</b> ${total}\n<b>Order ID:</b> #ID${orderId}`
+ txt = `✅ ✅ ✅\n<b>Spot ${side} Order CREATED</b>\n<b>Symbol:</b> #${symbol}\n<b>Price:</b> ${price}\n<b>Quantity:</b> ${fixFloat(quantity)}\n<b>Total:</b> ${total}\n<b>Order ID:</b> #ID${orderId}`
} else if (orderStatus === 'REJECTED') {
txt = `🚫 🚫 🚫\n<b>Spot ${side} Order REJECTED</b>\n<b>Symbol:</b> #${symbol}\n<b>Price:</b> ${price}\n<b>Quantity:</b> ${fixFloat(quantity)}\n<b>Total:</b> ${total}\n<b>Order ID:</b> #ID${orderId}`
}
} else if (executionType === 'CANCELED') {
if (orderStatus === 'CANCELED') {
- txt = `🛑 🛑 🛑\n<b>Spot ${side} Order CANCELED</b>\n<b>Symbol:</b> #${symbol}\n<b>Price:</b> ${price}\n<b>Quantity:</b> ${fixFloat(quantity)}\n<b>Total:</b> ${total}\n<b>Order ID:</b> #ID${orderId}`
+ txt = `❎ ❎ ❎\n<b>Spot ${side} Order CANCELED</b>\n<b>Symbol:</b> #${symbol}\n<b>Price:</b> ${price}\n<b>Quantity:</b> ${fixFloat(quantity)}\n<b>Total:</b> ${total}\n<b>Order ID:</b> #ID${orderId}`
}
} else if (executionType === 'TRADE') {
if (orderStatus === 'PARTIALLY_FILLED') {
- txt = `💰 💰 💰\n<b>Spot ${side} Order PARTIALLY FILLED</b>\n<b>Symbol:</b> #${symbol}\n<b>Price:</b> ${price}\n<b>Last Filled:</b> ${fixFloat(lastTradeQuantity)}\n<b>Remaining:</b> ${fixFloat(Number(quantity) - Number(Cumulative_filled_quantity))}\n<b>Total:</b> ${total}\n<b>Order ID:</b> #ID${orderId}`
+ txt = `⌛ ⌛ ⌛\n<b>Spot ${side} Order PARTIALLY FILLED</b>\n<b>Symbol:</b> #${symbol}\n<b>Price:</b> ${price}\n<b>Last Filled:</b> ${fixFloat(lastTradeQuantity)}\n<b>Remaining:</b> ${fixFloat(Number(quantity) - Number(Cumulative_filled_quantity))}\n<b>Total:</b> ${total}\n<b>Order ID:</b> #ID${orderId}`
} else if (orderStatus === 'FILLED') {
- txt = `✅ ✅ ✅\n<b>Spot ${side} Order FULLY FILLED</b>\n<b>Symbol:</b> #${symbol}\n<b>Price:</b> ${price}\n<b>Filled:</b> ${fixFloat(Cumulative_filled_quantity)}\n<b>Total:</b> ${total}\n<b>Order ID:</b> #ID${orderId}`
+ txt = `💰 💰 💰\n<b>Spot ${side} Order FULLY FILLED</b>\n<b>Symbol:</b> #${symbol}\n<b>Price:</b> ${price}\n<b>Filled:</b> ${fixFloat(Cumulative_filled_quantity)}\n<b>Total:</b> ${total}\n<b>Order ID:</b> #ID${orderId}`
}
} else if (['REPLACED', 'EXPIRED', 'PENDING_CANCEL'].includes(orderStatus)) {
txt = `🔴 🟡 🔵\n<b>Spot ${side} Order ${orderStatus}</b>\n<b>Symbol:</b> #${symbol}\n<b>Price:</b> ${price}\n<b>Quantity:</b> ${fixFloat(quantity)}\n<b>Total:</b> ${total}\n<b>Order ID:</b> #ID${orderId}`
} else {
- txt = `⚠️ ⚠️ ⚠️\n<b>Undefined</b>\nExecution Type: ${executionType}\nOrder Status ${orderStatus}\nFull Details:\n${data}`
+ txt = `⚠️ ⚠️⚠️\n<b>Undefined</b>\nExecution Type: ${executionType}\nOrder Status ${orderStatus}\nFull Details:\n${data}`
}
sendMessage(txt)
}