Cancel a member order
curl --request POST \
--url https://ge-exchange-staging-1.herokuapp.com/v1/api/members/{id}/orders/{orderId}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://ge-exchange-staging-1.herokuapp.com/v1/api/members/{id}/orders/{orderId}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://ge-exchange-staging-1.herokuapp.com/v1/api/members/{id}/orders/{orderId}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://ge-exchange-staging-1.herokuapp.com/v1/api/members/{id}/orders/{orderId}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://ge-exchange-staging-1.herokuapp.com/v1/api/members/{id}/orders/{orderId}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://ge-exchange-staging-1.herokuapp.com/v1/api/members/{id}/orders/{orderId}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://ge-exchange-staging-1.herokuapp.com/v1/api/members/{id}/orders/{orderId}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Order has been cancelled successfully",
"data": {
"_id": "665f2a1c9d3e4b0012ab34cd",
"token": "660018c2f4a1b20011a9e0b1",
"user": "65fe0a7c1b2c3d0011223344",
"price": 1.5,
"currency": "USD",
"amount": 100,
"type": "Buy",
"owner_model": "organisation",
"status": "Terminated",
"createdAt": "2026-07-20T10:15:00.000Z",
"updatedAt": "2026-07-23T12:43:48.000Z"
}
}
Members
Cancel a member order
Cancel an order owned by a member of the API client
POST
api
/
members
/
{id}
/
orders
/
{orderId}
/
cancel
Cancel a member order
curl --request POST \
--url https://ge-exchange-staging-1.herokuapp.com/v1/api/members/{id}/orders/{orderId}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://ge-exchange-staging-1.herokuapp.com/v1/api/members/{id}/orders/{orderId}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://ge-exchange-staging-1.herokuapp.com/v1/api/members/{id}/orders/{orderId}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://ge-exchange-staging-1.herokuapp.com/v1/api/members/{id}/orders/{orderId}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://ge-exchange-staging-1.herokuapp.com/v1/api/members/{id}/orders/{orderId}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://ge-exchange-staging-1.herokuapp.com/v1/api/members/{id}/orders/{orderId}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://ge-exchange-staging-1.herokuapp.com/v1/api/members/{id}/orders/{orderId}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Order has been cancelled successfully",
"data": {
"_id": "665f2a1c9d3e4b0012ab34cd",
"token": "660018c2f4a1b20011a9e0b1",
"user": "65fe0a7c1b2c3d0011223344",
"price": 1.5,
"currency": "USD",
"amount": 100,
"type": "Buy",
"owner_model": "organisation",
"status": "Terminated",
"createdAt": "2026-07-20T10:15:00.000Z",
"updatedAt": "2026-07-23T12:43:48.000Z"
}
}
Cancels an order that belongs to a member of the API client. The order’s status
flips from
Active to Terminated, escrowed funds are reversed, and an
order.cancelled webhook event is fired.
string
required
The ID of the member who owns the order.
string
required
The ID of the order to cancel.
{
"status": "success",
"message": "Order has been cancelled successfully",
"data": {
"_id": "665f2a1c9d3e4b0012ab34cd",
"token": "660018c2f4a1b20011a9e0b1",
"user": "65fe0a7c1b2c3d0011223344",
"price": 1.5,
"currency": "USD",
"amount": 100,
"type": "Buy",
"owner_model": "organisation",
"status": "Terminated",
"createdAt": "2026-07-20T10:15:00.000Z",
"updatedAt": "2026-07-23T12:43:48.000Z"
}
}
Error responses
| Status | Error code | When |
|---|---|---|
| 403 | USER_MISMATCH_ERROR | Order doesn’t belong to the member |
| 400 | ORDER_TERMINATED_ERROR | Order is already cancelled |
| 400 | ORDER_FULFILLED_ERROR | Order is already fulfilled |
| 403 | ORDER_OPERATION_NOT_ALLOWED_ERROR | Order type can’t be cancelled |
{
"status": "error",
"message": "You do not have access to this order"
}
Was this page helpful?
⌘I
