curl --request POST \
--url https://app.sandbox.rio.trade/api/orders/{id}/cancel \
--header 'x-api-key: <api-key>'import requests
url = "https://app.sandbox.rio.trade/api/orders/{id}/cancel"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://app.sandbox.rio.trade/api/orders/{id}/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://app.sandbox.rio.trade/api/orders/{id}/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 => [
"x-api-key: <api-key>"
],
]);
$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://app.sandbox.rio.trade/api/orders/{id}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.sandbox.rio.trade/api/orders/{id}/cancel")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sandbox.rio.trade/api/orders/{id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "6660bdefd6c964829d63fcb8",
"quoteId": "6660bdefd6c964829d63fcb7",
"userId": "66290ac8bd3903485989f82e",
"clientReferenceId": "my-reference-1234",
"status": "awaitingPayment",
"flow": "fiatToCrypto",
"origin": {
"asset": "MXN",
"amount": 1000,
"country": "MX"
},
"destination": {
"asset": "USDC",
"amount": 54.76,
"country": "MX"
},
"fixedLeg": "origin",
"pricingDetails": {
"fees": [
{
"type": "processing",
"amount": 20,
"asset": "MXN",
"tax": 3.2
}
]
},
"settlement": {
"mode": "deliverable",
"timing": "default",
"valueDateOffset": 1,
"effectiveValueDateOffset": 1,
"valueDate": "2026-10-12T18:00:00.000Z",
"payment": {
"asset": "MXN",
"amount": 1000,
"rail": "bankTransfer",
"network": "polygon",
"dueDate": "2026-10-12T18:00:00.000Z",
"status": "awaitingFunds",
"amountSettled": 0,
"bankAccountId": "66733d33222710ab2785dc62",
"addressId": "66733d33222710ab2785dc62",
"instructions": {
"blockchainAddress": "0xAf56edF88c429F1D6858f9E47731FF53F6d34D0C",
"blockchainMemo": "<string>",
"bankName": "STP",
"companyName": "Rio Transfer S.A.P.I. de C.V.",
"companyAddress": "<string>",
"bankAddress": "<string>",
"accountHolderName": "John Doe",
"accountNumber": "99998888",
"routingNumber": "<string>",
"reference": "9f5676",
"CLABE": "646180000000000001",
"CCI": "<string>",
"RUC": "<string>",
"RFC": "RBL123456789",
"NIT": "<string>",
"USBankTransferMethod": "wire"
},
"transactions": [
{
"amount": 1000,
"createdAt": "2026-10-12T18:00:00.000Z",
"blockchainTxId": "0x66ec2a9d4e1f6b7c8d9e0f1a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e",
"blockchainAddress": "0xAf56edF88c429F1D6858f9E47731FF53F6d34D0C",
"SPEITrackingNumber": "TRK20261012001",
"SPIDTrackingNumber": "<string>",
"CEPLink": "https://www.banxico.org.mx/cep/",
"reference": "9f5676",
"accountHolderName": "John Doe",
"accountNumber": "<string>",
"CCI": "<string>",
"CLABE": "014027000000000008"
}
],
"bulkBankPaymentId": "<string>",
"bulkCryptoPaymentId": "<string>"
},
"payout": {
"asset": "USDC",
"amount": 54.76,
"rail": "blockchain",
"network": "polygon",
"dueDate": "2026-10-12T18:00:00.000Z",
"status": "awaitingFunds",
"amountSettled": 0,
"bankAccountId": "66733d33222710ab2785dc62",
"addressId": "66733d33222710ab2785dc62",
"instructions": {
"blockchainAddress": "0xAf56edF88c429F1D6858f9E47731FF53F6d34D0C",
"blockchainMemo": "<string>",
"bankName": "STP",
"companyName": "Rio Transfer S.A.P.I. de C.V.",
"companyAddress": "<string>",
"bankAddress": "<string>",
"accountHolderName": "John Doe",
"accountNumber": "99998888",
"routingNumber": "<string>",
"reference": "9f5676",
"CLABE": "646180000000000001",
"CCI": "<string>",
"RUC": "<string>",
"RFC": "RBL123456789",
"NIT": "<string>",
"USBankTransferMethod": "wire"
},
"transactions": [
{
"amount": 1000,
"createdAt": "2026-10-12T18:00:00.000Z",
"blockchainTxId": "0x66ec2a9d4e1f6b7c8d9e0f1a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e",
"blockchainAddress": "0xAf56edF88c429F1D6858f9E47731FF53F6d34D0C",
"SPEITrackingNumber": "TRK20261012001",
"SPIDTrackingNumber": "<string>",
"CEPLink": "https://www.banxico.org.mx/cep/",
"reference": "9f5676",
"accountHolderName": "John Doe",
"accountNumber": "<string>",
"CCI": "<string>",
"CLABE": "014027000000000008"
}
],
"bulkBankPaymentId": "<string>",
"bulkCryptoPaymentId": "<string>"
}
},
"marketPrice": 0.056,
"netPrice": 0.05476,
"type": "market",
"limitNetPrice": 0.0555,
"timeInForceStartsAt": "2026-10-12T18:00:00.000Z",
"timeInForceEndsAt": "2026-10-12T18:00:00.000Z",
"attributes": [
"fixedPrice"
],
"notes": "Note",
"payoutTransferLimit": 475000,
"paymentReceivedAt": "2026-10-12T18:00:00.000Z",
"expiredQuotes": [],
"parentOrderId": "<string>",
"invoice": {
"PDFLink": "<string>",
"XMLLink": "<string>"
},
"informationalFees": {
"serviceFeeFiat": 0,
"serviceFeeFiatTax": 0
},
"createdAt": "2026-10-12T18:00:00.000Z"
}{
"errors": [
{
"code": 19,
"message": "Not authorized"
}
]
}Cancel order
curl --request POST \
--url https://app.sandbox.rio.trade/api/orders/{id}/cancel \
--header 'x-api-key: <api-key>'import requests
url = "https://app.sandbox.rio.trade/api/orders/{id}/cancel"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://app.sandbox.rio.trade/api/orders/{id}/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://app.sandbox.rio.trade/api/orders/{id}/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 => [
"x-api-key: <api-key>"
],
]);
$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://app.sandbox.rio.trade/api/orders/{id}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.sandbox.rio.trade/api/orders/{id}/cancel")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sandbox.rio.trade/api/orders/{id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "6660bdefd6c964829d63fcb8",
"quoteId": "6660bdefd6c964829d63fcb7",
"userId": "66290ac8bd3903485989f82e",
"clientReferenceId": "my-reference-1234",
"status": "awaitingPayment",
"flow": "fiatToCrypto",
"origin": {
"asset": "MXN",
"amount": 1000,
"country": "MX"
},
"destination": {
"asset": "USDC",
"amount": 54.76,
"country": "MX"
},
"fixedLeg": "origin",
"pricingDetails": {
"fees": [
{
"type": "processing",
"amount": 20,
"asset": "MXN",
"tax": 3.2
}
]
},
"settlement": {
"mode": "deliverable",
"timing": "default",
"valueDateOffset": 1,
"effectiveValueDateOffset": 1,
"valueDate": "2026-10-12T18:00:00.000Z",
"payment": {
"asset": "MXN",
"amount": 1000,
"rail": "bankTransfer",
"network": "polygon",
"dueDate": "2026-10-12T18:00:00.000Z",
"status": "awaitingFunds",
"amountSettled": 0,
"bankAccountId": "66733d33222710ab2785dc62",
"addressId": "66733d33222710ab2785dc62",
"instructions": {
"blockchainAddress": "0xAf56edF88c429F1D6858f9E47731FF53F6d34D0C",
"blockchainMemo": "<string>",
"bankName": "STP",
"companyName": "Rio Transfer S.A.P.I. de C.V.",
"companyAddress": "<string>",
"bankAddress": "<string>",
"accountHolderName": "John Doe",
"accountNumber": "99998888",
"routingNumber": "<string>",
"reference": "9f5676",
"CLABE": "646180000000000001",
"CCI": "<string>",
"RUC": "<string>",
"RFC": "RBL123456789",
"NIT": "<string>",
"USBankTransferMethod": "wire"
},
"transactions": [
{
"amount": 1000,
"createdAt": "2026-10-12T18:00:00.000Z",
"blockchainTxId": "0x66ec2a9d4e1f6b7c8d9e0f1a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e",
"blockchainAddress": "0xAf56edF88c429F1D6858f9E47731FF53F6d34D0C",
"SPEITrackingNumber": "TRK20261012001",
"SPIDTrackingNumber": "<string>",
"CEPLink": "https://www.banxico.org.mx/cep/",
"reference": "9f5676",
"accountHolderName": "John Doe",
"accountNumber": "<string>",
"CCI": "<string>",
"CLABE": "014027000000000008"
}
],
"bulkBankPaymentId": "<string>",
"bulkCryptoPaymentId": "<string>"
},
"payout": {
"asset": "USDC",
"amount": 54.76,
"rail": "blockchain",
"network": "polygon",
"dueDate": "2026-10-12T18:00:00.000Z",
"status": "awaitingFunds",
"amountSettled": 0,
"bankAccountId": "66733d33222710ab2785dc62",
"addressId": "66733d33222710ab2785dc62",
"instructions": {
"blockchainAddress": "0xAf56edF88c429F1D6858f9E47731FF53F6d34D0C",
"blockchainMemo": "<string>",
"bankName": "STP",
"companyName": "Rio Transfer S.A.P.I. de C.V.",
"companyAddress": "<string>",
"bankAddress": "<string>",
"accountHolderName": "John Doe",
"accountNumber": "99998888",
"routingNumber": "<string>",
"reference": "9f5676",
"CLABE": "646180000000000001",
"CCI": "<string>",
"RUC": "<string>",
"RFC": "RBL123456789",
"NIT": "<string>",
"USBankTransferMethod": "wire"
},
"transactions": [
{
"amount": 1000,
"createdAt": "2026-10-12T18:00:00.000Z",
"blockchainTxId": "0x66ec2a9d4e1f6b7c8d9e0f1a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e",
"blockchainAddress": "0xAf56edF88c429F1D6858f9E47731FF53F6d34D0C",
"SPEITrackingNumber": "TRK20261012001",
"SPIDTrackingNumber": "<string>",
"CEPLink": "https://www.banxico.org.mx/cep/",
"reference": "9f5676",
"accountHolderName": "John Doe",
"accountNumber": "<string>",
"CCI": "<string>",
"CLABE": "014027000000000008"
}
],
"bulkBankPaymentId": "<string>",
"bulkCryptoPaymentId": "<string>"
}
},
"marketPrice": 0.056,
"netPrice": 0.05476,
"type": "market",
"limitNetPrice": 0.0555,
"timeInForceStartsAt": "2026-10-12T18:00:00.000Z",
"timeInForceEndsAt": "2026-10-12T18:00:00.000Z",
"attributes": [
"fixedPrice"
],
"notes": "Note",
"payoutTransferLimit": 475000,
"paymentReceivedAt": "2026-10-12T18:00:00.000Z",
"expiredQuotes": [],
"parentOrderId": "<string>",
"invoice": {
"PDFLink": "<string>",
"XMLLink": "<string>"
},
"informationalFees": {
"serviceFeeFiat": 0,
"serviceFeeFiatTax": 0
},
"createdAt": "2026-10-12T18:00:00.000Z"
}{
"errors": [
{
"code": 19,
"message": "Not authorized"
}
]
}Requirements to consume the endpoint.
Create and modify role
User approved
Authorizations
Path Parameters
Id of the order to be cancelled.
Response
OK
Id of the order.
"6660bdefd6c964829d63fcb8"
Id of the quote the order is priced on. Changes when the order is re-quoted.
"6660bdefd6c964829d63fcb7"
Id of the user the order belongs to.
"66290ac8bd3903485989f82e"
Your own reference for the order.
"my-reference-1234"
Current status. These are the statuses an order moves through on a normal flow. Which ones it sees depends on the flow. Other statuses can appear depending on the circumstances of the order.
awaitingTimeInForceToStart, awaitingLimitPriceCondition, timeInForceEnded, created, addressCheckPassed, awaitingPayment, processing, paid, incorrectAmountPaid, sourcingLiquidity, liquiditySourced, filled, complete, depositAddressCreated, awaitingBankPayoutDetails, bankPayoutDetailsAdded, depositConfirmed, awaitingPayout, bankPaymentDetailsAdded, awaitingAsyncPayment, awaitingAsyncPayout, cancelled, expired "awaitingPayment"
Direction of the conversion, derived from the two assets. fiatToCrypto buys stablecoins, cryptoToFiat sells them, cryptoToCrypto swaps one stablecoin or network for another.
fiatToCrypto, cryptoToFiat, cryptoToCrypto "fiatToCrypto"
What the customer pays. The amount is in the leg's own asset.
Show child attributes
Show child attributes
What the customer receives. The amount is in the leg's own asset.
Show child attributes
Show child attributes
Which leg's amount you specified. The other leg was derived from the price and fees.
origin, destination "origin"
How the destination amount was derived from the origin amount.
Show child attributes
Show child attributes
How and when the two legs settle.
Show child attributes
Show child attributes
Market price at the time the order was created, in units of the destination asset per unit of the origin asset.
0.056
Final price including fees and taxes.
0.05476
market executes at the current price, limit waits for limitNetPrice.
market, limit "market"
Limit price for limit orders, expressed like netPrice as units of the destination asset per unit of the origin asset. Only applicable when orderType is limit.
0.0555
Earliest execution time of a limit order.
"2026-10-12T18:00:00.000Z"
Latest execution time of a limit order.
"2026-10-12T18:00:00.000Z"
List of attributes associated with the order.
["fixedPrice"]
Notes you attached to the order.
"Note"
Maximum amount per payout transfer. Larger payouts are split.
475000
When your payment was received.
"2026-10-12T18:00:00.000Z"
Ids of quotes the order went through before the current one.
[]
Id of the parent order when this order was spawned from a partial fill.
Invoice details, Mexican orders only.
Show child attributes
Show child attributes
Informational fees (do not affect the quote).
Show child attributes
Show child attributes
Creation time.
"2026-10-12T18:00:00.000Z"