@ -51,6 +51,15 @@ export const POST = async ({ locals, request }) => {
mode: 3,
})
const position = await client.getPositionInfo({
category: 'linear',
symbol: symbol,
if (position.result.list.length > 0) {
return new Response()
}
const wallet = await client.getWalletBalance({
accountType: 'UNIFIED',
coin: 'USDT',