aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiyush Dixit <79581397+PiyushDixit96@users.noreply.github.com>2021-05-10 21:22:12 +0530
committerGitHub <noreply@github.com>2021-05-10 21:22:12 +0530
commit184a3087b1b0d4f0594b4fe84b159e2ca9330460 (patch)
tree2837e8e1a13141ca3e2def97e16e1ccf524322cc
parent36de120456b6f0d176ef882fc59c44a4fedad835 (diff)
Update index.js
-rw-r--r--index.js8
1 files changed, 4 insertions, 4 deletions
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 = `✅ ✅ ✅\n<b>Spot Order CREATED\nSide:</b> ${data.side}\n<b>Symbol:</b> #${data.symbol}\n<b>Price:</b> ${fixFloat(data.price)}\n<b>Quantity:</b> ${fixFloat(data.quantity)}\n<b>Order ID:</b> #ID${data.orderId}`
+ txt = `💸 💸 💸\n<b>Spot Order CREATED\nSide:</b> ${data.side}\n<b>Symbol:</b> #${data.symbol}\n<b>Price:</b> ${fixFloat(data.price)}\n<b>Quantity:</b> ${fixFloat(data.quantity)}\n<b>Order ID:</b> #ID${data.orderId}`
}
else if (data.orderStatus === 'REJECTED') {
txt = `🚫 🚫 🚫\n<b>Spot Order REJECTED\nSide:</b> ${data.side}\n<b>Symbol:</b> #${data.symbol}\n<b>Price:</b> ${fixFloat(data.price)}\n<b>Quantity:</b> ${fixFloat(data.quantity)}\n<b>Order ID:</b> #ID${data.orderId}`
@@ -73,12 +73,12 @@ function process_data(data) {
}
} else if (data.executionType === 'TRADE') {
if (data.orderStatus === 'PARTIALLY_FILLED') {
- txt = `💰\n<b>Spot Order PARTIALLY FILLED\nSide:</b> ${data.side}\n<b>Symbol:</b> #${data.symbol}\n<b>Price:</b> ${fixFloat(data.price)}\n<b>Last Filled:</b> ${fixFloat(data.lastTradeQuantity)}\n<b>Remaining:</b> ${fixFloat(Number(data.quantity) - Number(data.accumulatedQuantity))}\n<b>Order ID:</b> #ID${data.orderId}`
+ txt = `💰 💰 💰\n<b>Spot Order PARTIALLY FILLED\nSide:</b> ${data.side}\n<b>Symbol:</b> #${data.symbol}\n<b>Price:</b> ${fixFloat(data.price)}\n<b>Last Filled:</b> ${fixFloat(data.lastTradeQuantity)}\n<b>Remaining:</b> ${fixFloat(Number(data.quantity) - Number(data.accumulatedQuantity))}\n<b>Order ID:</b> #ID${data.orderId}`
} else if (data.orderStatus === 'FILLED') {
- txt = `💰 💰 💰\n<b>Spot Order FULLY FILLED\nSide:</b> ${data.side}\n<b>Symbol:</b> #${data.symbol}\n<b>Price:</b> ${fixFloat(data.price)}\n<b>Filled:</b> ${fixFloat(data.accumulatedQuantity)}\n<b>Order ID:</b> #ID${data.orderId}`
+ txt = `✅ ✅ ✅\n<b>Spot Order FULLY FILLED\nSide:</b> ${data.side}\n<b>Symbol:</b> #${data.symbol}\n<b>Price:</b> ${fixFloat(data.price)}\n<b>Filled:</b> ${fixFloat(data.accumulatedQuantity)}\n<b>Order ID:</b> #ID${data.orderId}`
}
} else if (['REPLACED', 'EXPIRED', 'PENDING_CANCEL'].includes(data.orderStatus)) {
- txt = `🚫 🚫 🚫\n<b>Spot Order ${data.orderStatus}\nSide:</b> ${data.side}\n<b>Symbol:</b> #${data.symbol}\n<b>Price:</b> ${fixFloat(data.price)}\n<b>Quantity:</b> ${fixFloat(data.quantity)}\n<b>Order ID:</b> #ID${data.orderId}`
+ txt = `🔴 🟡 🔵\n<b>Spot Order ${data.orderStatus}\nSide:</b> ${data.side}\n<b>Symbol:</b> #${data.symbol}\n<b>Price:</b> ${fixFloat(data.price)}\n<b>Quantity:</b> ${fixFloat(data.quantity)}\n<b>Order ID:</b> #ID${data.orderId}`
} else {
txt = `⚠️ ⚠️ ⚠️\n<b>Undefined</b>\nExecution Type: ${data.executionType}\nOrder Status ${data.orderStatus}\nFull Details:\n${msg}`
}