can't cancel spot order,result in 400.

i use javascript to call balance spot api.
The cancel message is processed below:
var hmacMSG = CryptoJS.HmacSHA256(reqmsg, BNBSecKey);
var reqmsg = reqmsg+"&signature="+hmacMSG;
var requestType = tradingReqRULMap[actionType][‘type’];
var url = tradingReqRULMap[actionType][‘url’] + “?” + reqmsg;
This is the url and api type:
“cxlOrder”:{“url”:“https://api.binance.com/api/v3/order",“type”:"DELETE”}
var header = {};
if(tradingReqRULMap[actionType][‘APIKey’]){
header[“X-MBX-APIKEY”] = BNBAPIKEY;
}else{
console.log(actionType+" action is not need APIKEY.");
}
$.ajax({
type:requestType,
url:url,
contentType: “application/json”,//
headers:header,
success:function(data){
console.log(“OnOrderCxled:”+JSON.stringify(data));
if(data.status == “CANCELED”){
deleteOriOrder(data[‘origClientOrderId’])
}
},
error:function(xhr,textStatus,errorThrown){
}
After execute ajax to call the cancel api,i get error response message:
Request URL:
https://api.binance.com/api/v3/order?symbol=FILUSDT&origClientOrderId=1610883113945&recvWindow=60000&timestamp=1610883666025&signature=a8db5567f39718983093c0d64ca2fb1d6554e08a001f0bce50704cfb153e9c50
Request Method:
DELETE
Status Code:
400
Remote Address:
127.0.0.1:1080
Referrer Policy:
strict-origin-when-cross-origin
In the meantime,call GET api is normal.How to solve this problem?

You cannot do this from a browser; It’d be blocked by CORs policy; This endpoint only support below methods from different domain:

GET, HEAD, OPTIONS

Thanks.I managed to set chrome to disable the CORE policy.If can’t do this from a browser,how to CANCLE an order?

You need to set up a server end application to receive your cancellation request from a button and send to Binance from your server

The server end application you mean is websocket application not https request,right?

No. What I mean is you need to send a POST request from a server rather than in a browser. Please learn how to build a web service and forward an http request from the browser client; But this forum is not a proper place to discuss further about this topic

I don’t understand why this canccle request must be sent from a server not a brower.In fact,i get 2011 CANCEL_REJECTED message,i think the cancle order request has been received by the exchange,but rejected for some unknown reason.