|
|
|
@ -79,7 +79,7 @@ export const POST = async ({ locals, request }) => {
|
|
|
|
|
|
|
|
|
|
|
|
console.log({ qty, takeProfit, stopLoss })
|
|
|
|
console.log({ qty, takeProfit, stopLoss })
|
|
|
|
|
|
|
|
|
|
|
|
await client.submitOrder({
|
|
|
|
const order = await client.submitOrder({
|
|
|
|
category: 'linear',
|
|
|
|
category: 'linear',
|
|
|
|
symbol,
|
|
|
|
symbol,
|
|
|
|
side,
|
|
|
|
side,
|
|
|
|
@ -88,6 +88,8 @@ export const POST = async ({ locals, request }) => {
|
|
|
|
takeProfit,
|
|
|
|
takeProfit,
|
|
|
|
stopLoss,
|
|
|
|
stopLoss,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log(order.result.orderId)
|
|
|
|
} catch (error) {
|
|
|
|
} catch (error) {
|
|
|
|
console.log('Error', error)
|
|
|
|
console.log('Error', error)
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
|