diff options
author | Piyush Dixit <79581397+PiyushDixit96@users.noreply.github.com> | 2021-05-10 21:22:12 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-10 21:22:12 +0530 |
commit | 184a3087b1b0d4f0594b4fe84b159e2ca9330460 (patch) | |
tree | 2837e8e1a13141ca3e2def97e16e1ccf524322cc | |
parent | 36de120456b6f0d176ef882fc59c44a4fedad835 (diff) |
Update index.js
-rw-r--r-- | index.js | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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}`
}
|