Orders - Cancel Order
curl --request POST \
--url https://api.ripio.com/trade/orders/cancel \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--header 'signature: <signature>' \
--header 'timestamp: <timestamp>' \
--data '
{
"id": "7155ED34-9EC4-4733-8B32-1E4319CB662F"
}
'import requests
url = "https://api.ripio.com/trade/orders/cancel"
payload = { "id": "7155ED34-9EC4-4733-8B32-1E4319CB662F" }
headers = {
"authorization": "<authorization>",
"signature": "<signature>",
"timestamp": "<timestamp>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
authorization: '<authorization>',
signature: '<signature>',
timestamp: '<timestamp>',
'Content-Type': 'application/json'
},
body: JSON.stringify({id: '7155ED34-9EC4-4733-8B32-1E4319CB662F'})
};
fetch('https://api.ripio.com/trade/orders/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://api.ripio.com/trade/orders/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '7155ED34-9EC4-4733-8B32-1E4319CB662F'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"authorization: <authorization>",
"signature: <signature>",
"timestamp: <timestamp>"
],
]);
$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.ripio.com/trade/orders/cancel"
payload := strings.NewReader("{\n \"id\": \"7155ED34-9EC4-4733-8B32-1E4319CB662F\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "<authorization>")
req.Header.Add("signature", "<signature>")
req.Header.Add("timestamp", "<timestamp>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.ripio.com/trade/orders/cancel")
.header("authorization", "<authorization>")
.header("signature", "<signature>")
.header("timestamp", "<timestamp>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"7155ED34-9EC4-4733-8B32-1E4319CB662F\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ripio.com/trade/orders/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
request["signature"] = '<signature>'
request["timestamp"] = '<timestamp>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"7155ED34-9EC4-4733-8B32-1E4319CB662F\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"create_date": "2017-12-08T23:42:54.960Z",
"executed_amount": 0.02347418,
"external_id": "B4A9F7F4-9C79-4921-9330-224C17260BDF",
"id": "7155ED34-9EC4-4733-8B32-1E4319CB662F",
"pair": "BTC_BRL",
"price": 42600,
"remaining_amount": 0.1,
"remaining_value": 0.6,
"requested_amount": 0.02347418,
"requested_value": 1000,
"side": "buy",
"status": "canceled",
"total_value": 1000,
"type": "limit",
"update_date": "2017-12-13T21:48:48.817Z"
},
"error_code": null,
"message": null
}Orders
Cancel Order
Cancels an active order by its id using POST.
Publishes updates in the following websocket topics: orderbook, balance and order_status.
Authorization
- Requires a valid API key.
- Required API-key permission(s):
- Trading (Write)
POST
/
trade
/
orders
/
cancel
Orders - Cancel Order
curl --request POST \
--url https://api.ripio.com/trade/orders/cancel \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--header 'signature: <signature>' \
--header 'timestamp: <timestamp>' \
--data '
{
"id": "7155ED34-9EC4-4733-8B32-1E4319CB662F"
}
'import requests
url = "https://api.ripio.com/trade/orders/cancel"
payload = { "id": "7155ED34-9EC4-4733-8B32-1E4319CB662F" }
headers = {
"authorization": "<authorization>",
"signature": "<signature>",
"timestamp": "<timestamp>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
authorization: '<authorization>',
signature: '<signature>',
timestamp: '<timestamp>',
'Content-Type': 'application/json'
},
body: JSON.stringify({id: '7155ED34-9EC4-4733-8B32-1E4319CB662F'})
};
fetch('https://api.ripio.com/trade/orders/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://api.ripio.com/trade/orders/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '7155ED34-9EC4-4733-8B32-1E4319CB662F'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"authorization: <authorization>",
"signature: <signature>",
"timestamp: <timestamp>"
],
]);
$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.ripio.com/trade/orders/cancel"
payload := strings.NewReader("{\n \"id\": \"7155ED34-9EC4-4733-8B32-1E4319CB662F\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "<authorization>")
req.Header.Add("signature", "<signature>")
req.Header.Add("timestamp", "<timestamp>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.ripio.com/trade/orders/cancel")
.header("authorization", "<authorization>")
.header("signature", "<signature>")
.header("timestamp", "<timestamp>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"7155ED34-9EC4-4733-8B32-1E4319CB662F\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ripio.com/trade/orders/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
request["signature"] = '<signature>'
request["timestamp"] = '<timestamp>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"7155ED34-9EC4-4733-8B32-1E4319CB662F\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"create_date": "2017-12-08T23:42:54.960Z",
"executed_amount": 0.02347418,
"external_id": "B4A9F7F4-9C79-4921-9330-224C17260BDF",
"id": "7155ED34-9EC4-4733-8B32-1E4319CB662F",
"pair": "BTC_BRL",
"price": 42600,
"remaining_amount": 0.1,
"remaining_value": 0.6,
"requested_amount": 0.02347418,
"requested_value": 1000,
"side": "buy",
"status": "canceled",
"total_value": 1000,
"type": "limit",
"update_date": "2017-12-13T21:48:48.817Z"
},
"error_code": null,
"message": null
}Headers
The API key as a string.
See the Generating Signature section for more details.
A timestamp in milliseconds. See the Timestamp Security section for more details.
An additional, non-required parameter, that you can send to specify the number of milliseconds after the timestamp for the request to be valid. See the Timestamp Security section for more details.
Body
application/json
Order id
Example:
"7155ED34-9EC4-4733-8B32-1E4319CB662F"
Response
200 - application/json
Ok
Show child attributes
Show child attributes
Example:
{
"create_date": "2017-12-08T23:42:54.960Z",
"executed_amount": 0.02347418,
"external_id": "B4A9F7F4-9C79-4921-9330-224C17260BDF",
"id": "7155ED34-9EC4-4733-8B32-1E4319CB662F",
"pair": "BTC_BRL",
"price": 42600,
"remaining_amount": 0.1,
"remaining_value": 0.6,
"requested_amount": 0.02347418,
"requested_value": 1000,
"side": "buy",
"status": "canceled",
"total_value": 1000,
"type": "limit",
"update_date": "2017-12-13T21:48:48.817Z"
}
Example:
null
Example:
null
⌘I