|
|
|
@ -79,6 +79,14 @@ export const POST = async ({ locals, request }) => {
|
|
|
|
wallet.result.list[0].totalAvailableBalance,
|
|
|
|
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 = (
|
|
|
|
qty = (
|
|
|
|
(Number(form.data.entryPrice) *
|
|
|
|
(Number(form.data.entryPrice) *
|
|
|
|
Number(form.data.qtyPercent)) /
|
|
|
|
Number(form.data.qtyPercent)) /
|
|
|
|
|