Cancel multiple orders by hash
curl --request POST \
--url https://api.unitedmarket.ai/orders/cancel-many \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"orderHashes": [
"<string>"
],
"account": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({orderHashes: ['<string>'], account: '<string>'})
};
fetch('https://api.unitedmarket.ai/orders/cancel-many', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.unitedmarket.ai/orders/cancel-many"
payload = {
"orderHashes": ["<string>"],
"account": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"cancelled": 1,
"orderHashes": [
"<string>"
],
"failed": [
{
"orderHash": "<string>",
"error": "<string>"
}
]
}{
"message": "<string>",
"error": "Unauthorized",
"statusCode": 401
}Orders
Cancel multiple orders by hash
Cancels between 1 and 100 selected orders by hash. This is distinct from cancel-all: only the supplied order hashes are considered. Ownership is checked for every order, and failures do not roll back successful cancellations.
POST
https://api.unitedmarket.ai
/
orders
/
cancel-many
Cancel multiple orders by hash
curl --request POST \
--url https://api.unitedmarket.ai/orders/cancel-many \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"orderHashes": [
"<string>"
],
"account": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({orderHashes: ['<string>'], account: '<string>'})
};
fetch('https://api.unitedmarket.ai/orders/cancel-many', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.unitedmarket.ai/orders/cancel-many"
payload = {
"orderHashes": ["<string>"],
"account": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"cancelled": 1,
"orderHashes": [
"<string>"
],
"failed": [
{
"orderHash": "<string>",
"error": "<string>"
}
]
}{
"message": "<string>",
"error": "Unauthorized",
"statusCode": 401
}Authorizations
SIWE access token returned by POST /auth/verify.
Body
application/json
Response
Cancellation batch processed; individual orders may have failed.
