Skip to main content

Exit All Positions

Exit all the open positions

curl --location --request POST 'https://api.upstox.com/v2/order/positions/exit' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {your_access_token}' \

Exit all the open positions for a given segment

curl --location --request POST 'https://api.upstox.com/v2/order/positions/exit?segment=NSE_FO' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {your_access_token}' \

Exit all the open positions for a given tag

curl --location --request POST 'https://api.upstox.com/v2/order/positions/exit?tag=xyz' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {your_access_token}' \