curl --request DELETE \
--url https://api.ornn.com/v1/markets/spot/orders/{orderId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ornn.com/v1/markets/spot/orders/{orderId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ornn.com/v1/markets/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.ornn.com/v1/markets/spot/orders/{orderId}",
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.ornn.com/v1/markets/spot/orders/{orderId}"
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.ornn.com/v1/markets/spot/orders/{orderId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/v1/markets/spot/orders/{orderId}")
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{
"order": {
"orderId": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa",
"orderBookId": "bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbbb",
"gpuSlug": "nvidia_h100_sxm",
"side": "bid",
"orderType": "limit",
"pricePerGpuHourMicroUsd": 2500000,
"requestedGpus": 8,
"remainingGpus": 0,
"status": "ended",
"cancelReason": null,
"aggressorSide": "bid",
"listingId": "eeeeeeee-eeee-4eee-8eee-eeeeeeeeeeee",
"nodeId": "33333333-3333-4333-8333-333333333333",
"createdAt": "2026-10-14T18:30:00.000Z",
"filledAt": "2026-10-14T18:30:00.000Z",
"endedAt": "2026-10-14T21:05:00.000Z",
"endReason": "stopped_by_buyer",
"isMine": true,
"isSeller": false
}
}{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}{
"detail": {
"code": "order_not_found",
"message": "Ornn could not find that order."
}
}{
"code": "<string>",
"detail": "<string>"
}Cancel a bid or end a spot reservation
Cancels a resting bid, or ends a running spot reservation and stops its VM. The buyer can cancel or end its own bids. The organization that listed the node can end a running bid on it (endReason stopped_by_seller). Repeating the call on a cancelled or ended order returns its current state. Asks that your listings place on the book cannot be cancelled here; delist the listing instead.
A running reservation is billed for the time it ran; the unused part of the current hour returns as Ornn credits. The VM stops asynchronously after the order ends.
curl --request DELETE \
--url https://api.ornn.com/v1/markets/spot/orders/{orderId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ornn.com/v1/markets/spot/orders/{orderId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ornn.com/v1/markets/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.ornn.com/v1/markets/spot/orders/{orderId}",
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.ornn.com/v1/markets/spot/orders/{orderId}"
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.ornn.com/v1/markets/spot/orders/{orderId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/v1/markets/spot/orders/{orderId}")
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{
"order": {
"orderId": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa",
"orderBookId": "bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbbb",
"gpuSlug": "nvidia_h100_sxm",
"side": "bid",
"orderType": "limit",
"pricePerGpuHourMicroUsd": 2500000,
"requestedGpus": 8,
"remainingGpus": 0,
"status": "ended",
"cancelReason": null,
"aggressorSide": "bid",
"listingId": "eeeeeeee-eeee-4eee-8eee-eeeeeeeeeeee",
"nodeId": "33333333-3333-4333-8333-333333333333",
"createdAt": "2026-10-14T18:30:00.000Z",
"filledAt": "2026-10-14T18:30:00.000Z",
"endedAt": "2026-10-14T21:05:00.000Z",
"endReason": "stopped_by_buyer",
"isMine": true,
"isSeller": false
}
}{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}{
"detail": {
"code": "order_not_found",
"message": "Ornn could not find that order."
}
}{
"code": "<string>",
"detail": "<string>"
}ornn spot cancel --order-id <order-id> --yes.Authorizations
Create an organization API key in Account Settings > Developer. Do not send this key to the Kubernetes API server.
Path Parameters
Spot order ID. For a filled bid this is also its reservation ID.
Response
The order after cancellation: status cancelled (resting bid) or ended (running bid).
Show child attributes
Show child attributes
Was this page helpful?