Sell - Open order Not executed Asap

i want to sell the open order ex:- i buyed an option & i want to sell it. how can i do it
what i am using is not working


const axios = require(‘axios’);

const url = ‘https://api-hft.upstox.com/v2/order/cancel?order_id=240108010445130’;
const headers = {
‘Accept’: ‘application/json’,
‘Authorization’: ‘Bearer {your_access_token}’, // Replace {your_access_token} with the actual access token
};

axios.delete(url, { headers })
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error.response ? error.response.data : error.message);
});

how can i sell the opend position.
urgently solution needed

@Ketan Can you look into this?

@vinod_mokashi,

Upon reviewing the order ID you provided, we found that a cancellation request was made at 10:44 AM, followed by another cancellation request at 10:56 AM.
The second cancellation attempt resulted in the error Cancellation of an already cancelled order is not allowed, which corresponds with the error displayed in the screenshot you shared.

I trust this clarifies the issue.

Thank you.

Ok I understood what you said. if cancellation attempt was made then why didn’t it executed.?
there was a open position buyer an bank-nifty CE/PE option & I want that position to sell / cancel (as per document). so I requested the order with function using same order-id.
it didn’t worked?
Anyway will you guide me how I can exit a open position

@vinod_mokashi can you share your user id for further investigation

yes here is user id : 56AUJK

Dear @vinod_mokashi

Upon reviewing the matter, we discovered that the order ID 240827025373935, as indicated in the screenshot, was successfully canceled at 10:30 AM. However, the order ID provided in the cancel order API call (240108010445130) is invalid.
Kindly verify and confirm the cancellation of BANKNIFTY 28AUG24 50300PE at 10:30 AM.

Thank you.

Ok Thank You .
and what charges will be there of old api user per order