From df78929d11a3c1086d2c2e40bac5fb68cae2d9e2 Mon Sep 17 00:00:00 2001 From: TZGyn Date: Thu, 20 Feb 2025 01:17:01 +0800 Subject: [PATCH] log calculation --- src/routes/webhook/tradingview/+server.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/routes/webhook/tradingview/+server.ts b/src/routes/webhook/tradingview/+server.ts index 9ccb327..c67eccc 100644 --- a/src/routes/webhook/tradingview/+server.ts +++ b/src/routes/webhook/tradingview/+server.ts @@ -79,6 +79,14 @@ export const POST = async ({ locals, request }) => { wallet.result.list[0].totalAvailableBalance, ) + console.log('calculate:') + console.log('Entry Price:', form.data.entryPrice) + console.log('Qty Percent:', form.data.qtyPercent) + console.log( + 'Wallet Balance:', + wallet.result.list[0].totalAvailableBalance, + ) + qty = ( (Number(form.data.entryPrice) * Number(form.data.qtyPercent)) /