Amend Spot order (delayed)
curl --request PATCH \
--url https://api.ondoperps.xyz/v1/spot/orders/{orderID}/delayed \
--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}/delayed"
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}/delayed', 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}/delayed",
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}/delayed"
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}/delayed")
.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}/delayed")
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"
}Spot trading
Amend Spot order (delayed)
Amend a resting Spot limit order after the account’s placement delay. Accepts the same body as PATCH /v1/spot/orders/{orderID}. Use this path when the server directs a price amend to it. Sign the exact delayed path with a fresh timestamp.
See the Spot API guide. Requires authentication; API-key scope: trade.
PATCH
/
v1
/
spot
/
orders
/
{orderID}
/
delayed
Amend Spot order (delayed)
curl --request PATCH \
--url https://api.ondoperps.xyz/v1/spot/orders/{orderID}/delayed \
--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}/delayed"
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}/delayed', 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}/delayed",
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}/delayed"
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}/delayed")
.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}/delayed")
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
BearerAuthApiKeyAuth
Path Parameters
Body
application/json
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.
Example:
false
Response
Amended order