curl --request PATCH \
--url https://api.ondoperps.xyz/v1/spot/orders/{orderID} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"price": "599.5",
"version": 0
}
'import requests
url = "https://api.ondoperps.xyz/v1/spot/orders/{orderID}"
payload = {
"price": "599.5",
"version": 0
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({price: '599.5', version: 0})
};
fetch('https://api.ondoperps.xyz/v1/spot/orders/{orderID}', 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.ondoperps.xyz/v1/spot/orders/{orderID}",
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([
'price' => '599.5',
'version' => 0
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/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.ondoperps.xyz/v1/spot/orders/{orderID}"
payload := strings.NewReader("{\n \"price\": \"599.5\",\n \"version\": 0\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.ondoperps.xyz/v1/spot/orders/{orderID}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"price\": \"599.5\",\n \"version\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ondoperps.xyz/v1/spot/orders/{orderID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"price\": \"599.5\",\n \"version\": 0\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"result": {
"orderId": "197ec08e001658690721be129e7fa595",
"side": "buy",
"price": "599.5",
"size": "2",
"market": "SPY-USDC",
"filledSize": "0",
"lastFillSize": "0",
"filledCost": "0",
"fee": "0",
"status": "open",
"createdAt": "2026-10-20T08:21:37.457839Z",
"amendedAt": "2026-10-20T08:25:52.581560Z",
"version": 1,
"type": "limit",
"timeInForce": "GTC"
}
}{
"success": false,
"error": "Description of the error",
"error_code": "too_many_requests"
}Amend Spot order
Amend a resting Spot limit order in place by exchange ID or client-prefixed ID. Send size, price, or both, with the order’s current version; an omitted field keeps its value. size is the new total base size, including filled quantity. A stale version returns 409 amend_version_mismatch and changes nothing. Reducing the size at the same price keeps queue priority. A larger size or a new price moves the order to the back of its price level, and a new price that crosses the book trades immediately as a taker. An amend that needs more free balance than you have returns insufficient_funds. If the server directs a price amend to /v1/spot/orders/{orderID}/delayed, re-sign it for that exact path with a fresh timestamp. Size-only amends and amends with postOnly: true are not delayed. An order placed as post-only is always amended as post-only, so an amend whose new price would match returns post_only_has_match; send postOnly: true to also skip the delay for its price amends.
See the Spot API guide. Requires authentication; API-key scope: trade.
curl --request PATCH \
--url https://api.ondoperps.xyz/v1/spot/orders/{orderID} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"price": "599.5",
"version": 0
}
'import requests
url = "https://api.ondoperps.xyz/v1/spot/orders/{orderID}"
payload = {
"price": "599.5",
"version": 0
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({price: '599.5', version: 0})
};
fetch('https://api.ondoperps.xyz/v1/spot/orders/{orderID}', 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.ondoperps.xyz/v1/spot/orders/{orderID}",
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([
'price' => '599.5',
'version' => 0
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/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.ondoperps.xyz/v1/spot/orders/{orderID}"
payload := strings.NewReader("{\n \"price\": \"599.5\",\n \"version\": 0\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.ondoperps.xyz/v1/spot/orders/{orderID}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"price\": \"599.5\",\n \"version\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ondoperps.xyz/v1/spot/orders/{orderID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"price\": \"599.5\",\n \"version\": 0\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"result": {
"orderId": "197ec08e001658690721be129e7fa595",
"side": "buy",
"price": "599.5",
"size": "2",
"market": "SPY-USDC",
"filledSize": "0",
"lastFillSize": "0",
"filledCost": "0",
"fee": "0",
"status": "open",
"createdAt": "2026-10-20T08:21:37.457839Z",
"amendedAt": "2026-10-20T08:25:52.581560Z",
"version": 1,
"type": "limit",
"timeInForce": "GTC"
}
}{
"success": false,
"error": "Description of the error",
"error_code": "too_many_requests"
}Authorizations
Path Parameters
Body
Send size, price, or both. Any other field returns amend_field_not_supported.
If true, the amend returns post_only_has_match instead of trading when the new price would match. Applies to this amend only and does not change the order's own post-only setting. An order placed as post-only is always amended as post-only, so false does not let it trade.
false
Response
Amended order