Cancel order but using limit order

i wont cancel order but limit order means i wont cancel order but limit code in nodejs
i wont to code both nodejs SDK and API also

this code is sdk

let UpstoxClient = require('upstox-js-sdk');
let defaultClient = UpstoxClient.ApiClient.instance;
var OAUTH2 = defaultClient.authentications['OAUTH2'];
OAUTH2.accessToken = "{your_access_token}";
let apiInstance = new UpstoxClient.OrderApi();

let orderId = "240111010403654"; 
let apiVersion = "2.0"; 

apiInstance.cancelOrder(orderId, apiVersion, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

this api code

const axios = require('axios');

const url = 'https://api.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);
    });

You can find the sample code for canceling an order here: Cancel Order Sample Code.

Please note that you can only cancel open or pending orders, which applies to both After-Market Orders (AMO) and regular orders.

Could you please provide more details on what you mean by “Cancel order but using limit order” so we can better assist you?