From 4cf2c1acf552f3d2092dc54688605fa8bd2bc5a3 Mon Sep 17 00:00:00 2001 From: TZGyn Date: Tue, 11 Feb 2025 19:04:33 +0800 Subject: [PATCH] tp/sl optional --- src/routes/webhook/tradingview/+server.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/webhook/tradingview/+server.ts b/src/routes/webhook/tradingview/+server.ts index 5ef2dee..c97afe0 100644 --- a/src/routes/webhook/tradingview/+server.ts +++ b/src/routes/webhook/tradingview/+server.ts @@ -13,8 +13,8 @@ export const POST = async ({ locals, request }) => { symbol: z.string(), side: z.enum(['Buy', 'Sell']), qty: z.string(), - takeProfit: z.string(), - stopLoss: z.string(), + takeProfit: z.string().optional(), + stopLoss: z.string().optional(), }) .safeParse(body)