Subscribe: Spot Order Amends
curl --request POST \
--url wss://api.ondoperps.xyz/ws/orderAmendsSpot \
--header 'Content-Type: application/json' \
--data '
{
"op": "subscribe",
"channel": "orderAmendsSpot",
"markets": [
"NVDA-USDC"
]
}
'import requests
url = "wss://api.ondoperps.xyz/ws/orderAmendsSpot"
payload = {
"op": "subscribe",
"channel": "orderAmendsSpot",
"markets": ["NVDA-USDC"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({op: 'subscribe', channel: 'orderAmendsSpot', markets: ['NVDA-USDC']})
};
fetch('wss://api.ondoperps.xyz/ws/orderAmendsSpot', 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 => "wss://api.ondoperps.xyz/ws/orderAmendsSpot",
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([
'op' => 'subscribe',
'channel' => 'orderAmendsSpot',
'markets' => [
'NVDA-USDC'
]
]),
CURLOPT_HTTPHEADER => [
"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 := "wss://api.ondoperps.xyz/ws/orderAmendsSpot"
payload := strings.NewReader("{\n \"op\": \"subscribe\",\n \"channel\": \"orderAmendsSpot\",\n \"markets\": [\n \"NVDA-USDC\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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("wss://api.ondoperps.xyz/ws/orderAmendsSpot")
.header("Content-Type", "application/json")
.body("{\n \"op\": \"subscribe\",\n \"channel\": \"orderAmendsSpot\",\n \"markets\": [\n \"NVDA-USDC\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("wss://api.ondoperps.xyz/ws/orderAmendsSpot")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"op\": \"subscribe\",\n \"channel\": \"orderAmendsSpot\",\n \"markets\": [\n \"NVDA-USDC\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"type": "update",
"channel": "orderAmendsSpot",
"data": [
{
"orderId": "197ec08e001658690721be129e7fa595",
"side": "buy",
"price": "227.50",
"size": "12.00",
"market": "SPY-USDC",
"filledSize": "0.00",
"filledCost": "0.00",
"fee": "0.00",
"status": "open",
"createdAt": "2025-03-05T14:30:00Z",
"amendedAt": "2025-03-05T14:32:00Z",
"version": 1,
"type": "limit",
"timeInForce": "GTC",
"previousSize": "10.00",
"previousPrice": "227.50"
}
]
}Spot private channels
Subscribe: Spot Order Amends
Subscribe to the orderAmendsSpot channel. Requires authentication (login first).
Optional markets to filter.
Each update carries an order you amended, with its size and price from before the amend in previousSize and previousPrice. The amended order is also published on ordersSpot, like any other order update.
Send this subscription over the shared /ws connection; /ws/orderAmendsSpot is a documentation route, not a separate socket URL. See the Spot API guide. Events do not include a complete history at subscription. Initialize and reconcile through REST after reconnects.
POST
/
ws
/
orderAmendsSpot
Subscribe: Spot Order Amends
curl --request POST \
--url wss://api.ondoperps.xyz/ws/orderAmendsSpot \
--header 'Content-Type: application/json' \
--data '
{
"op": "subscribe",
"channel": "orderAmendsSpot",
"markets": [
"NVDA-USDC"
]
}
'import requests
url = "wss://api.ondoperps.xyz/ws/orderAmendsSpot"
payload = {
"op": "subscribe",
"channel": "orderAmendsSpot",
"markets": ["NVDA-USDC"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({op: 'subscribe', channel: 'orderAmendsSpot', markets: ['NVDA-USDC']})
};
fetch('wss://api.ondoperps.xyz/ws/orderAmendsSpot', 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 => "wss://api.ondoperps.xyz/ws/orderAmendsSpot",
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([
'op' => 'subscribe',
'channel' => 'orderAmendsSpot',
'markets' => [
'NVDA-USDC'
]
]),
CURLOPT_HTTPHEADER => [
"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 := "wss://api.ondoperps.xyz/ws/orderAmendsSpot"
payload := strings.NewReader("{\n \"op\": \"subscribe\",\n \"channel\": \"orderAmendsSpot\",\n \"markets\": [\n \"NVDA-USDC\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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("wss://api.ondoperps.xyz/ws/orderAmendsSpot")
.header("Content-Type", "application/json")
.body("{\n \"op\": \"subscribe\",\n \"channel\": \"orderAmendsSpot\",\n \"markets\": [\n \"NVDA-USDC\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("wss://api.ondoperps.xyz/ws/orderAmendsSpot")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"op\": \"subscribe\",\n \"channel\": \"orderAmendsSpot\",\n \"markets\": [\n \"NVDA-USDC\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"type": "update",
"channel": "orderAmendsSpot",
"data": [
{
"orderId": "197ec08e001658690721be129e7fa595",
"side": "buy",
"price": "227.50",
"size": "12.00",
"market": "SPY-USDC",
"filledSize": "0.00",
"filledCost": "0.00",
"fee": "0.00",
"status": "open",
"createdAt": "2025-03-05T14:30:00Z",
"amendedAt": "2025-03-05T14:32:00Z",
"version": 1,
"type": "limit",
"timeInForce": "GTC",
"previousSize": "10.00",
"previousPrice": "227.50"
}
]
}Body
application/json