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{
"quoteId": "6660bdefd6c964829d63fcb7",
"userId": "65a99abb6a92bda6e52bf7af",
"status": "cancelled",
"crypto": "USDC",
"side": "buy",
"fiat": "USD",
"createdAt": "2024-06-05T19:35:17.436Z",
"cryptoAddress": "0xAf56edF88c429F1D6858f9E47731FF53F6d34D0C",
"country": "MX",
"amountFiat": 1000,
"amountCrypto": 55.51,
"fees": {
"processingFeeFiat": 0,
"transferFeeFiat": 0.17594406538826532,
"platformFeeFiat": 20
},
"marketPrice": 0.0568362449619,
"notes": "Description",
"expiredQuotes": [
"<string>"
],
"id": "6660bdf5cc4633bc64122f3c"
}{
"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{
"quoteId": "6660bdefd6c964829d63fcb7",
"userId": "65a99abb6a92bda6e52bf7af",
"status": "cancelled",
"crypto": "USDC",
"side": "buy",
"fiat": "USD",
"createdAt": "2024-06-05T19:35:17.436Z",
"cryptoAddress": "0xAf56edF88c429F1D6858f9E47731FF53F6d34D0C",
"country": "MX",
"amountFiat": 1000,
"amountCrypto": 55.51,
"fees": {
"processingFeeFiat": 0,
"transferFeeFiat": 0.17594406538826532,
"platformFeeFiat": 20
},
"marketPrice": 0.0568362449619,
"notes": "Description",
"expiredQuotes": [
"<string>"
],
"id": "6660bdf5cc4633bc64122f3c"
}{
"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
The unique identifier assigned to the quote.
"6660bdefd6c964829d63fcb7"
The unique identifier assigned to the user.
"65a99abb6a92bda6e52bf7af"
The current status of the order, which is cancelled once the cancellation goes through.
cancelled The type of cryptocurrency used in the order.
USDC, USDC_POLYGON_NXTB, SOL_USDC_PTHX, XLM_USDC_5F3T, USDC_BASECHAIN_ETH_5I5C, USDCE_TEMPO_MXYR, USDT_POLYGON, USDT_ERC20, TRX_USDT_S2UZ, USDT_BSC, SOL_USDT_EWAY, EUROC_ETH_F5NG, EURC_SOL, EURC_B609K9QB_Y213 The side of the order, indicating whether it's a buy or sell order.
buy, sell The type of fiat currency used in the order.
USD, MXN, PEN, COP The date and time when the order was created.
"2024-06-05T19:35:17.436Z"
The address associated with the cryptocurrency used in the order.
"0xAf56edF88c429F1D6858f9E47731FF53F6d34D0C"
The country where the user is located.
MX, PE, CO The total amount of the order in fiat currency.
1000
The total amount of the order in cryptocurrency.
55.51
Details of the applied fees.
Show child attributes
Show child attributes
Price of the cryptocurrency.
0.0568362449619
Additional notes about the order.
"Description"
List of expired quotes.
Unique identifier of the order.
"6660bdf5cc4633bc64122f3c"