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}` }