Cancel order by hash
curl --request POST \
--url https://api.unitedmarket.ai/orders/{hash}/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({account: '<string>'})
};
fetch('https://api.unitedmarket.ai/orders/{hash}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.unitedmarket.ai/orders/{hash}/cancel"
payload = { "account": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true
}{
"message": "<string>",
"error": "Unauthorized",
"statusCode": 401
}{
"message": "<string>",
"error": "Unauthorized",
"statusCode": 401
}Orders
Cancel order by hash
Cancels one order by hash without a market id in the path. Ownership is checked against the SIWE session or per-user API key. A personal API key is enough; JWT is optional. Distinct from POST /markets/{id}/orders/cancel, which takes orderHash in the body.
POST
https://api.unitedmarket.ai
/
orders
/
{hash}
/
cancel
Cancel order by hash
curl --request POST \
--url https://api.unitedmarket.ai/orders/{hash}/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({account: '<string>'})
};
fetch('https://api.unitedmarket.ai/orders/{hash}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.unitedmarket.ai/orders/{hash}/cancel"
payload = { "account": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true
}{
"message": "<string>",
"error": "Unauthorized",
"statusCode": 401
}{
"message": "<string>",
"error": "Unauthorized",
"statusCode": 401
}