curl --request PATCH \
--url https://api.copper.co/platform/orders/{cancelOrderId} \
--header 'Content-Type: application/vnd.cancel-order+json' \
--data '
{
"reason": "<string>"
}
'import requests
url = "https://api.copper.co/platform/orders/{cancelOrderId}"
payload = { "reason": "<string>" }
headers = {"Content-Type": "application/vnd.cancel-order+json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/vnd.cancel-order+json'},
body: JSON.stringify({reason: '<string>'})
};
fetch('https://api.copper.co/platform/orders/{cancelOrderId}', 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://api.copper.co/platform/orders/{cancelOrderId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'reason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/vnd.cancel-order+json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.copper.co/platform/orders/{cancelOrderId}"
payload := strings.NewReader("{\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/vnd.cancel-order+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.copper.co/platform/orders/{cancelOrderId}")
.header("Content-Type", "application/vnd.cancel-order+json")
.body("{\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.copper.co/platform/orders/{cancelOrderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/vnd.cancel-order+json'
request.body = "{\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"amount": "<string>",
"baseCurrency": "<string>",
"createdAt": "<string>",
"externalOrderId": "<string>",
"orderId": "<string>",
"orderType": "sell",
"portfolioId": "<string>",
"portfolioType": "custody",
"status": "new",
"createdBy": "<string>",
"extra": {
"availableCoSigners": [
"<string>"
],
"availableSnapshot": "<string>",
"balanceSnapshot": "<string>",
"blockchainTransactionType": "send",
"clearLoop": true,
"clearLoopExtra": {
"clearLoopExternalNetted": true,
"clearLoopSettlementId": "<string>"
},
"clientAccountId": "<string>",
"coSigners": [
"<string>"
],
"coSignersNumber": "<string>",
"confirmations": "<string>",
"counterpartyPortfolioId": "<string>",
"deliveryType": "free-of-payment",
"depositOrderId": "<string>",
"depositTargetId": "<string>",
"description": "<string>",
"estimatedFees": {
"fee": "<string>",
"feeCurrency": "<string>",
"baseFeePerGas": "<string>",
"estimatedTime": "<string>",
"feePerByte": {},
"gasLimit": {},
"gasPriceGwei": "<string>",
"maxFeePerGas": "<string>",
"maxPriorityFeePerGas": "<string>",
"reportingCurrencyRate": "<string>",
"transactionBytes": "<string>"
},
"externalBroadcast": true,
"feeLevel": "low",
"fees": [
{
"fee": "<string>",
"feeCurrency": "<string>",
"baseFeePerGas": "<string>",
"estimatedTime": "<string>",
"feePerByte": {},
"gasLimit": {},
"gasPriceGwei": "<string>",
"maxFeePerGas": "<string>",
"maxPriorityFeePerGas": "<string>",
"reportingCurrencyRate": "<string>",
"transactionBytes": "<string>"
}
],
"fromAddresses": [
"<string>"
],
"fromCounterpartyId": "<string>",
"fromCryptoAddress": {
"address": "<string>",
"addressType": "externally-owned-account",
"createdAt": "<string>",
"createdBy": "<string>",
"cryptoAddressId": "<string>",
"currency": "<string>",
"isWhitelist": true,
"name": "<string>",
"_embedded": {
"currencyConfigurations": [
{
"createdAt": "<string>",
"createdBy": "<string>",
"cryptoAddressId": "<string>",
"currency": "<string>",
"currencyConfigurationId": "<string>",
"isWhitelist": true,
"extra": {},
"lastUsedAt": "<string>",
"portfolioIds": [
"<string>"
],
"updatedAt": "<string>",
"updatedBy": "<string>"
}
]
},
"acceptTokens": true,
"addressTags": [],
"category": "smart-contract",
"extra": {},
"lastUsedAt": "<string>",
"mainCurrency": "<string>",
"memo": "<string>",
"organizationId": "<string>",
"portfolioIds": [
"<string>"
],
"updatedAt": "<string>",
"updatedBy": "<string>"
},
"fromCryptoAddressId": "<string>",
"fromPortfolioId": "<string>",
"includeFeeInWithdraw": true,
"invoiceId": "<string>",
"marketPrice": "<string>",
"memo": "<string>",
"nextTransferTo": [
{
"targetType": "external",
"cryptoAddressId": "<string>",
"portfolioId": "<string>"
}
],
"originalDepositAmount": "<string>",
"partSigned": {},
"payload": "<string>",
"payloads": [
"<string>"
],
"reportingCurrencyRate": "<string>",
"reportingQuoteCurrencyRate": "<string>",
"signed": {},
"spenderAddress": "<string>",
"terminatedReportingCurrencyRate": "<string>",
"toAddress": "<string>",
"toCounterpartyId": "<string>",
"toCryptoAddressId": "<string>",
"toInvoiceId": "<string>",
"toLendingInvoiceId": "<string>",
"toPortfolioId": "<string>",
"totalQuoteAmount": "<string>",
"transactionId": "<string>",
"transactionRequest": {},
"transferAmount": "<string>",
"transferChainId": "<string>",
"transferDepositTargetId": "<string>",
"transferFees": "<string>",
"transferFeesCurrency": "<string>",
"transferTransactionId": "<string>",
"withdrawFee": "<string>",
"withdrawOrderId": "<string>"
},
"limitType": "otc",
"mainCurrency": "<string>",
"organizationId": "<string>",
"quoteCurrency": "<string>",
"quoteMainCurrency": "<string>",
"terminatedAt": "<string>",
"updatedAt": "<string>"
}{
"error": "bad-request",
"message": "<string>"
}{
"error": "forbidden",
"message": "<string>"
}{
"error": "conflict",
"message": "<string>"
}Cancel order
curl --request PATCH \
--url https://api.copper.co/platform/orders/{cancelOrderId} \
--header 'Content-Type: application/vnd.cancel-order+json' \
--data '
{
"reason": "<string>"
}
'import requests
url = "https://api.copper.co/platform/orders/{cancelOrderId}"
payload = { "reason": "<string>" }
headers = {"Content-Type": "application/vnd.cancel-order+json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/vnd.cancel-order+json'},
body: JSON.stringify({reason: '<string>'})
};
fetch('https://api.copper.co/platform/orders/{cancelOrderId}', 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://api.copper.co/platform/orders/{cancelOrderId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'reason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/vnd.cancel-order+json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.copper.co/platform/orders/{cancelOrderId}"
payload := strings.NewReader("{\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/vnd.cancel-order+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.copper.co/platform/orders/{cancelOrderId}")
.header("Content-Type", "application/vnd.cancel-order+json")
.body("{\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.copper.co/platform/orders/{cancelOrderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/vnd.cancel-order+json'
request.body = "{\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"amount": "<string>",
"baseCurrency": "<string>",
"createdAt": "<string>",
"externalOrderId": "<string>",
"orderId": "<string>",
"orderType": "sell",
"portfolioId": "<string>",
"portfolioType": "custody",
"status": "new",
"createdBy": "<string>",
"extra": {
"availableCoSigners": [
"<string>"
],
"availableSnapshot": "<string>",
"balanceSnapshot": "<string>",
"blockchainTransactionType": "send",
"clearLoop": true,
"clearLoopExtra": {
"clearLoopExternalNetted": true,
"clearLoopSettlementId": "<string>"
},
"clientAccountId": "<string>",
"coSigners": [
"<string>"
],
"coSignersNumber": "<string>",
"confirmations": "<string>",
"counterpartyPortfolioId": "<string>",
"deliveryType": "free-of-payment",
"depositOrderId": "<string>",
"depositTargetId": "<string>",
"description": "<string>",
"estimatedFees": {
"fee": "<string>",
"feeCurrency": "<string>",
"baseFeePerGas": "<string>",
"estimatedTime": "<string>",
"feePerByte": {},
"gasLimit": {},
"gasPriceGwei": "<string>",
"maxFeePerGas": "<string>",
"maxPriorityFeePerGas": "<string>",
"reportingCurrencyRate": "<string>",
"transactionBytes": "<string>"
},
"externalBroadcast": true,
"feeLevel": "low",
"fees": [
{
"fee": "<string>",
"feeCurrency": "<string>",
"baseFeePerGas": "<string>",
"estimatedTime": "<string>",
"feePerByte": {},
"gasLimit": {},
"gasPriceGwei": "<string>",
"maxFeePerGas": "<string>",
"maxPriorityFeePerGas": "<string>",
"reportingCurrencyRate": "<string>",
"transactionBytes": "<string>"
}
],
"fromAddresses": [
"<string>"
],
"fromCounterpartyId": "<string>",
"fromCryptoAddress": {
"address": "<string>",
"addressType": "externally-owned-account",
"createdAt": "<string>",
"createdBy": "<string>",
"cryptoAddressId": "<string>",
"currency": "<string>",
"isWhitelist": true,
"name": "<string>",
"_embedded": {
"currencyConfigurations": [
{
"createdAt": "<string>",
"createdBy": "<string>",
"cryptoAddressId": "<string>",
"currency": "<string>",
"currencyConfigurationId": "<string>",
"isWhitelist": true,
"extra": {},
"lastUsedAt": "<string>",
"portfolioIds": [
"<string>"
],
"updatedAt": "<string>",
"updatedBy": "<string>"
}
]
},
"acceptTokens": true,
"addressTags": [],
"category": "smart-contract",
"extra": {},
"lastUsedAt": "<string>",
"mainCurrency": "<string>",
"memo": "<string>",
"organizationId": "<string>",
"portfolioIds": [
"<string>"
],
"updatedAt": "<string>",
"updatedBy": "<string>"
},
"fromCryptoAddressId": "<string>",
"fromPortfolioId": "<string>",
"includeFeeInWithdraw": true,
"invoiceId": "<string>",
"marketPrice": "<string>",
"memo": "<string>",
"nextTransferTo": [
{
"targetType": "external",
"cryptoAddressId": "<string>",
"portfolioId": "<string>"
}
],
"originalDepositAmount": "<string>",
"partSigned": {},
"payload": "<string>",
"payloads": [
"<string>"
],
"reportingCurrencyRate": "<string>",
"reportingQuoteCurrencyRate": "<string>",
"signed": {},
"spenderAddress": "<string>",
"terminatedReportingCurrencyRate": "<string>",
"toAddress": "<string>",
"toCounterpartyId": "<string>",
"toCryptoAddressId": "<string>",
"toInvoiceId": "<string>",
"toLendingInvoiceId": "<string>",
"toPortfolioId": "<string>",
"totalQuoteAmount": "<string>",
"transactionId": "<string>",
"transactionRequest": {},
"transferAmount": "<string>",
"transferChainId": "<string>",
"transferDepositTargetId": "<string>",
"transferFees": "<string>",
"transferFeesCurrency": "<string>",
"transferTransactionId": "<string>",
"withdrawFee": "<string>",
"withdrawOrderId": "<string>"
},
"limitType": "otc",
"mainCurrency": "<string>",
"organizationId": "<string>",
"quoteCurrency": "<string>",
"quoteMainCurrency": "<string>",
"terminatedAt": "<string>",
"updatedAt": "<string>"
}{
"error": "bad-request",
"message": "<string>"
}{
"error": "forbidden",
"message": "<string>"
}{
"error": "conflict",
"message": "<string>"
}Headers
application/vnd.cancel-order+json
Path Parameters
Body
Response
OK
Amount of order in baseCurrency
Base currency of the order
Order creation timestamp
The order ID in the external system
Order ID
Order type. See details
sell, buy, deposit, withdraw, multi-withdraw, wallet-message, retrieved-deposit, earn-reward, earn-shared-reward, claim-shared-reward, cross-chain-deposit, cross-chain-withdraw Portfolio ID
Portfolio type. See details
custody, trading-vault, trading, external, clearloop Order status. Note: When an order has completed processing, it enters one of the final states and returns a 'terminal' status. terminalStatuses are: EXECUTED, CANCELED, LIQUIDATED, ERROR, BLOCKED, DECLINED, SUSPENDED, REJECTED. See details
new, waiting-funds, reserving, reserved, queued, validating-funds, working, waiting-approve, co-sign-require, approved, processing, executed, canceled, rejecting, rejected, declining, declined, suspending, suspended, blocked, action-required, accepting, accepted, require-initializer-approve, waiting-counterparty-approve, require-counterparty-approve, ready-for-settlement, settled, part-signed-tx-added, full-signed-tx-added, rejected-part-signed-tx-added, rejected-full-signed-tx-added, accepted-part-signed-tx-added, accepted-full-signed-tx-added, awaiting-settlement, master-password-required, manual-resolving, error, pending-atomic-settlement-confirmation, atomic-settlement-reservation-completed, require-finalize, waiting-accept-deposit, waiting-reject-deposit Creator user id
Additional order information
Show child attributes
Show child attributes
Limit type of the order. See details
otc, rfq Blockchain network of a baseCurrency
Organization id
The quote currency of the order (in case of a settle order)
Blockchain network of a quoteCurrency
Order termination timestamp
Order update timestamp
Was this page helpful?