Orders - Update the amount and/or price of an order
curl --request PUT \
--url https://api.ripio.com/trade/orders \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--header 'signature: <signature>' \
--header 'timestamp: <timestamp>' \
--data '
{
"order_id": "00CE34E9-0168-4050-9D58-10C705A1AC81",
"unit_price": "10",
"amount": "100"
}
'import requests
url = "https://api.ripio.com/trade/orders"
payload = {
"order_id": "00CE34E9-0168-4050-9D58-10C705A1AC81",
"unit_price": "10",
"amount": "100"
}
headers = {
"authorization": "<authorization>",
"signature": "<signature>",
"timestamp": "<timestamp>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
authorization: '<authorization>',
signature: '<signature>',
timestamp: '<timestamp>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
order_id: '00CE34E9-0168-4050-9D58-10C705A1AC81',
unit_price: '10',
amount: '100'
})
};
fetch('https://api.ripio.com/trade/orders', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'order_id' => '00CE34E9-0168-4050-9D58-10C705A1AC81',
'unit_price' => '10',
'amount' => '100'
]),
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"
payload := strings.NewReader("{\n \"order_id\": \"00CE34E9-0168-4050-9D58-10C705A1AC81\",\n \"unit_price\": \"10\",\n \"amount\": \"100\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.ripio.com/trade/orders")
.header("authorization", "<authorization>")
.header("signature", "<signature>")
.header("timestamp", "<timestamp>")
.header("Content-Type", "application/json")
.body("{\n \"order_id\": \"00CE34E9-0168-4050-9D58-10C705A1AC81\",\n \"unit_price\": \"10\",\n \"amount\": \"100\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ripio.com/trade/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["authorization"] = '<authorization>'
request["signature"] = '<signature>'
request["timestamp"] = '<timestamp>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"order_id\": \"00CE34E9-0168-4050-9D58-10C705A1AC81\",\n \"unit_price\": \"10\",\n \"amount\": \"100\"\n}"
response = http.request(request)
puts response.read_body{
"data": 123,
"error_code": null,
"message": null
}Orders
Update The Amount And/or Price Of An Order
PUT
/
trade
/
orders
Orders - Update the amount and/or price of an order
curl --request PUT \
--url https://api.ripio.com/trade/orders \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--header 'signature: <signature>' \
--header 'timestamp: <timestamp>' \
--data '
{
"order_id": "00CE34E9-0168-4050-9D58-10C705A1AC81",
"unit_price": "10",
"amount": "100"
}
'import requests
url = "https://api.ripio.com/trade/orders"
payload = {
"order_id": "00CE34E9-0168-4050-9D58-10C705A1AC81",
"unit_price": "10",
"amount": "100"
}
headers = {
"authorization": "<authorization>",
"signature": "<signature>",
"timestamp": "<timestamp>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
authorization: '<authorization>',
signature: '<signature>',
timestamp: '<timestamp>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
order_id: '00CE34E9-0168-4050-9D58-10C705A1AC81',
unit_price: '10',
amount: '100'
})
};
fetch('https://api.ripio.com/trade/orders', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'order_id' => '00CE34E9-0168-4050-9D58-10C705A1AC81',
'unit_price' => '10',
'amount' => '100'
]),
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"
payload := strings.NewReader("{\n \"order_id\": \"00CE34E9-0168-4050-9D58-10C705A1AC81\",\n \"unit_price\": \"10\",\n \"amount\": \"100\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.ripio.com/trade/orders")
.header("authorization", "<authorization>")
.header("signature", "<signature>")
.header("timestamp", "<timestamp>")
.header("Content-Type", "application/json")
.body("{\n \"order_id\": \"00CE34E9-0168-4050-9D58-10C705A1AC81\",\n \"unit_price\": \"10\",\n \"amount\": \"100\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ripio.com/trade/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["authorization"] = '<authorization>'
request["signature"] = '<signature>'
request["timestamp"] = '<timestamp>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"order_id\": \"00CE34E9-0168-4050-9D58-10C705A1AC81\",\n \"unit_price\": \"10\",\n \"amount\": \"100\"\n}"
response = http.request(request)
puts response.read_body{
"data": 123,
"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