Update index.js

This commit is contained in:
Piyush Dixit 2021-05-23 01:56:55 +05:30 committed by GitHub
parent f77d568498
commit 1f6a65ef11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,20 +79,18 @@ function process_data(data) {
if (["BNB", "BTC", "XRP", "TRX", "ETH", "AUD", "BRL", "EUR", "GBP", "RUB", "TRY", "PAX", "DAI", "UAH", "NGN", "VAI"].includes(str3)) { if (["BNB", "BTC", "XRP", "TRX", "ETH", "AUD", "BRL", "EUR", "GBP", "RUB", "TRY", "PAX", "DAI", "UAH", "NGN", "VAI"].includes(str3)) {
sy = str3 sy = str3
} }
let total let total=``;
if (orderType !== "LIMIT") { if (orderType === "MARKET") {
total = `${fixFloat(Number(price) * Number(quantity))} ${sy}`
let {
L: Last_price
} = data;
price = Last_price price = Last_price
}else{
total = `\n<b>Total:</b> ${fixFloat(Number(price) * Number(quantity))} ${sy}`
} }
if (executionType === 'NEW') { if (executionType === 'NEW') {
if (orderStatus === 'NEW') { if (orderStatus === 'NEW') {
if (orderType === "MARKET") { if (orderType === "MARKET") {
txt = `✅ ✅ ✅\n<b>Spot ${orderType} ${side} Order CREATED</b>\n<b>Symbol:</b> #${symbol}\n<b>Quantity:</b> ${fixFloat(quantity)}\n<b>Order ID:</b> #ID${orderId}` txt = `✅ ✅ ✅\n<b>Spot ${orderType} ${side} Order CREATED</b>\n<b>Symbol:</b> #${symbol}\n<b>Quantity:</b> ${fixFloat(quantity)}\n<b>Order ID:</b> #ID${orderId}`
}else { }else {
txt = `✅ ✅ ✅\n<b>Spot ${orderType} ${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 ${orderType} ${side} Order CREATED</b>\n<b>Symbol:</b> #${symbol}\n<b>Price:</b> ${price}\n<b>Quantity:</b> ${fixFloat(quantity)}${total}\n<b>Order ID:</b> #ID${orderId}`
} }
} else if (orderStatus === 'REJECTED') { } else if (orderStatus === 'REJECTED') {
if (orderType === "MARKET") { if (orderType === "MARKET") {