curl --request POST \
--url https://api.ornn.com/v1/markets/spot/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"gpuSlug": "nvidia_h100_sxm",
"gpus": 8,
"orderType": "limit",
"pricePerGpuHourMicroUsd": 2700000
}
'import requests
url = "https://api.ornn.com/v1/markets/spot/orders"
payload = {
"gpuSlug": "nvidia_h100_sxm",
"gpus": 8,
"orderType": "limit",
"pricePerGpuHourMicroUsd": 2700000
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
gpuSlug: 'nvidia_h100_sxm',
gpus: 8,
orderType: 'limit',
pricePerGpuHourMicroUsd: 2700000
})
};
fetch('https://api.ornn.com/v1/markets/spot/orders', 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",
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([
'gpuSlug' => 'nvidia_h100_sxm',
'gpus' => 8,
'orderType' => 'limit',
'pricePerGpuHourMicroUsd' => 2700000
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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.ornn.com/v1/markets/spot/orders"
payload := strings.NewReader("{\n \"gpuSlug\": \"nvidia_h100_sxm\",\n \"gpus\": 8,\n \"orderType\": \"limit\",\n \"pricePerGpuHourMicroUsd\": 2700000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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.post("https://api.ornn.com/v1/markets/spot/orders")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"gpuSlug\": \"nvidia_h100_sxm\",\n \"gpus\": 8,\n \"orderType\": \"limit\",\n \"pricePerGpuHourMicroUsd\": 2700000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/v1/markets/spot/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"gpuSlug\": \"nvidia_h100_sxm\",\n \"gpus\": 8,\n \"orderType\": \"limit\",\n \"pricePerGpuHourMicroUsd\": 2700000\n}"
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": 8,
"status": "resting",
"cancelReason": null,
"aggressorSide": null,
"listingId": null,
"nodeId": null,
"createdAt": "2026-10-14T18:30:00.000Z",
"filledAt": null,
"endedAt": null,
"endReason": null,
"isMine": true,
"isSeller": false
}
}{
"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": "running",
"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": null,
"endReason": null,
"isMine": true,
"isSeller": false
}
}{
"detail": {
"code": "idempotency_key_required",
"message": "Send an Idempotency-Key header with this request."
}
}{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}{
"detail": {
"code": "order_book_not_found",
"message": "There is no spot market for that GPU type."
}
}{
"detail": {
"code": "idempotency_conflict",
"message": "That request key was already used for a different request."
}
}{
"detail": {
"code": "invalid_gpus",
"message": "Spot orders take 1, 2, 4, or 8 GPUs."
}
}{
"code": "<string>",
"detail": "<string>"
}Place a Spot bid
Bids for one VM with 1, 2, 4, or 8 GPUs on one node. A limit bid fills now against the lowest ask at or below your price, fees included, or rests on the book; a market bid fills now or is cancelled with cancelReason unfilled_market_order. Each bid fills against one ask with room for all its GPUs and never against your own organization’s capacity. Some asks sell only to 8-GPU bids, and a 2- or 4-GPU bid also needs a matching group of GPUs free on the node.
A filled bid has status running and becomes a spot reservation with the same ID. The reservation appears shortly after the fill; poll GET /commerce/reservations/ using the orderId. Each hour is prepaid when it starts, from Ornn credits first and then your saved card. The bid is not refused for a missing card, but if the first or a later hour cannot be paid the reservation ends with endReason payment_failed. Save a card in the console before bidding unless your credits cover the hours.
Requires Idempotency-Key. To buy several VMs, place one bid per VM, each with its own key. Available to every member of your organization; approval is not required.
curl --request POST \
--url https://api.ornn.com/v1/markets/spot/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"gpuSlug": "nvidia_h100_sxm",
"gpus": 8,
"orderType": "limit",
"pricePerGpuHourMicroUsd": 2700000
}
'import requests
url = "https://api.ornn.com/v1/markets/spot/orders"
payload = {
"gpuSlug": "nvidia_h100_sxm",
"gpus": 8,
"orderType": "limit",
"pricePerGpuHourMicroUsd": 2700000
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
gpuSlug: 'nvidia_h100_sxm',
gpus: 8,
orderType: 'limit',
pricePerGpuHourMicroUsd: 2700000
})
};
fetch('https://api.ornn.com/v1/markets/spot/orders', 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",
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([
'gpuSlug' => 'nvidia_h100_sxm',
'gpus' => 8,
'orderType' => 'limit',
'pricePerGpuHourMicroUsd' => 2700000
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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.ornn.com/v1/markets/spot/orders"
payload := strings.NewReader("{\n \"gpuSlug\": \"nvidia_h100_sxm\",\n \"gpus\": 8,\n \"orderType\": \"limit\",\n \"pricePerGpuHourMicroUsd\": 2700000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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.post("https://api.ornn.com/v1/markets/spot/orders")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"gpuSlug\": \"nvidia_h100_sxm\",\n \"gpus\": 8,\n \"orderType\": \"limit\",\n \"pricePerGpuHourMicroUsd\": 2700000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/v1/markets/spot/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"gpuSlug\": \"nvidia_h100_sxm\",\n \"gpus\": 8,\n \"orderType\": \"limit\",\n \"pricePerGpuHourMicroUsd\": 2700000\n}"
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": 8,
"status": "resting",
"cancelReason": null,
"aggressorSide": null,
"listingId": null,
"nodeId": null,
"createdAt": "2026-10-14T18:30:00.000Z",
"filledAt": null,
"endedAt": null,
"endReason": null,
"isMine": true,
"isSeller": false
}
}{
"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": "running",
"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": null,
"endReason": null,
"isMine": true,
"isSeller": false
}
}{
"detail": {
"code": "idempotency_key_required",
"message": "Send an Idempotency-Key header with this request."
}
}{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}{
"detail": {
"code": "order_book_not_found",
"message": "There is no spot market for that GPU type."
}
}{
"detail": {
"code": "idempotency_conflict",
"message": "That request key was already used for a different request."
}
}{
"detail": {
"code": "invalid_gpus",
"message": "Spot orders take 1, 2, 4, or 8 GPUs."
}
}{
"code": "<string>",
"detail": "<string>"
}ornn spot bid --gpu-slug <gpu-slug> --gpus 8 --price-per-gpu-hour-micro-usd 2700000 --yes. Pass --idempotency-key to make a retry safe.
Send a new Idempotency-Key for each bid. If the response is lost, retry with the same key and body: you get the original order back instead of a second bid. See Rent GPUs on Spot.Authorizations
Create an organization API key in Account Settings > Developer. Do not send this key to the Kubernetes API server.
Headers
Required. A unique key of 1 to 200 characters for this operation, such as a UUID. Retrying with the same key and the same body returns the original result with HTTP 200 instead of creating a second one. The key is remembered for 24 hours per organization; reusing it for a different request returns 409 idempotency_conflict. A missing key returns 400 idempotency_key_required.
1 - 200Body
Catalog GPU slug of the order book.
GPUs for one VM on one node. To buy N VMs, place N bids with N keys.
1, 2, 4, 8 limit fills at or below your price or rests on the book until it fills or you cancel. market fills now at the best available ask or is cancelled.
limit, market Required for limit bids; omit for market bids. The most you pay per GPU-hour, fees included, in integer micro-USD (1000000 is $1.00).
x >= 1Response
A retry with the same Idempotency-Key and body; returns the original order's current state.
Show child attributes
Show child attributes
Was this page helpful?