Cancel Spot batch
curl --request DELETE \
--url https://api.ondoperps.xyz/v1/spot/orders/batch \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ondoperps.xyz/v1/spot/orders/batch"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ondoperps.xyz/v1/spot/orders/batch', 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/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ondoperps.xyz/v1/spot/orders/batch"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.ondoperps.xyz/v1/spot/orders/batch")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ondoperps.xyz/v1/spot/orders/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"result": {
"successfulCancels": [
{
"orderId": "70a37d8f972f2494837f9dba8364cbb4",
"side": "buy",
"price": "1.55",
"size": "20.30",
"market": "SPY-USDC",
"filledSize": "5.403",
"lastFillSize": "5.403",
"filledCost": "8.37465",
"fee": "0.0837",
"status": "open",
"createdAt": "2022-06-16T12:35:11.123456Z",
"type": "limit",
"clientOrderId": "order123",
"filledAt": "2022-06-16T12:35:11.123456Z",
"canceledAt": "2022-06-16T12:35:11.123456Z",
"cancelReason": "liquidation",
"timeInForce": "GTC"
}
],
"failedCancels": [
{
"orderId": "<string>",
"error": "<string>",
"errorCode": "<string>"
}
]
}
}{
"success": false,
"error": "Description of the error",
"error_code": "too_many_requests"
}Spot trading
Cancel Spot batch
Cancel 1–20 exchange IDs or client:-prefixed IDs. Inspect successfulCancels and failedCancels; this is not an atomic cancel-and-replace.
See the Spot API guide. Requires authentication; API-key scope: trade.
DELETE
/
v1
/
spot
/
orders
/
batch
Cancel Spot batch
curl --request DELETE \
--url https://api.ondoperps.xyz/v1/spot/orders/batch \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ondoperps.xyz/v1/spot/orders/batch"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ondoperps.xyz/v1/spot/orders/batch', 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/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ondoperps.xyz/v1/spot/orders/batch"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.ondoperps.xyz/v1/spot/orders/batch")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ondoperps.xyz/v1/spot/orders/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"result": {
"successfulCancels": [
{
"orderId": "70a37d8f972f2494837f9dba8364cbb4",
"side": "buy",
"price": "1.55",
"size": "20.30",
"market": "SPY-USDC",
"filledSize": "5.403",
"lastFillSize": "5.403",
"filledCost": "8.37465",
"fee": "0.0837",
"status": "open",
"createdAt": "2022-06-16T12:35:11.123456Z",
"type": "limit",
"clientOrderId": "order123",
"filledAt": "2022-06-16T12:35:11.123456Z",
"canceledAt": "2022-06-16T12:35:11.123456Z",
"cancelReason": "liquidation",
"timeInForce": "GTC"
}
],
"failedCancels": [
{
"orderId": "<string>",
"error": "<string>",
"errorCode": "<string>"
}
]
}
}{
"success": false,
"error": "Description of the error",
"error_code": "too_many_requests"
}Authorizations
BearerAuthApiKeyAuth
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Comma-separated order identifiers; URL-encode the query.
Example:
"order1,client:my-order2"