curl --request POST \
--url https://api.ornn.com/v1/markets/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"gpuSlug": "nvidia_h100_sxm",
"nodes": 2,
"orderType": "market"
}
'import requests
url = "https://api.ornn.com/v1/markets/orders"
payload = {
"gpuSlug": "nvidia_h100_sxm",
"nodes": 2,
"orderType": "market"
}
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', nodes: 2, orderType: 'market'})
};
fetch('https://api.ornn.com/v1/markets/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/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',
'nodes' => 2,
'orderType' => 'market'
]),
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/orders"
payload := strings.NewReader("{\n \"gpuSlug\": \"nvidia_h100_sxm\",\n \"nodes\": 2,\n \"orderType\": \"market\"\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/orders")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"gpuSlug\": \"nvidia_h100_sxm\",\n \"nodes\": 2,\n \"orderType\": \"market\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/v1/markets/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 \"nodes\": 2,\n \"orderType\": \"market\"\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",
"saleType": "spot",
"region": null,
"side": "bid",
"orderType": "limit",
"pricePerGpuHourMicroUsd": 2500000,
"requested": 16,
"remaining": 16,
"filledNodes": 0,
"filledGpus": 0,
"fillIds": [],
"status": "resting",
"cancelReason": null,
"createdAt": "2026-10-14T18:30:00.000Z",
"isMine": true,
"isSeller": false
}
}{
"order": {
"orderId": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa",
"orderBookId": "bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbbb",
"gpuSlug": "nvidia_h100_sxm",
"saleType": "spot",
"region": null,
"side": "bid",
"orderType": "market",
"pricePerGpuHourMicroUsd": null,
"requested": 16,
"remaining": 0,
"filledNodes": 2,
"filledGpus": 16,
"fillIds": [
"dddddddd-dddd-4ddd-8ddd-dddddddddddd"
],
"status": "filled",
"cancelReason": null,
"createdAt": "2026-10-14T18:30:00.000Z",
"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 order book for that GPU type."
}
}{
"detail": {
"code": "idempotency_conflict",
"message": "That request key was already used for a different request."
}
}{
"detail": {
"code": "nodes_need_market_order",
"message": "Buy nodes with a market order. A limit bid takes a number of GPUs."
}
}{
"code": "<string>",
"detail": "<string>"
}Place a bid
Bids for GPUs or for nodes; send exactly one of gpus or nodes. A bid takes capacity from the lowest asks at or below your limit, fees included, oldest first at each price, across listings and, without a region, across locations. With gpus it takes GPUs until it has enough, so one node can supply part of a bid and a bid can span nodes. With nodes it takes that many distinct nodes with a GPU free, and every GPU free on each; each node runs as one VM, or as a few VMs on hosts whose GPUs can only be split in powers of two (6 GPUs run as a 4-GPU and a 2-GPU VM). A limit bid rests whatever it did not take, and later capacity fills it further; a market bid takes what is for sale now and cancels the rest with cancelReason unfilled_market_order. A bid never takes your own organization’s capacity.
nodes needs a market order; a limit bid with nodes is refused with nodes_need_market_order. The order counts GPUs: a bid for nodes records the GPUs it took as requested, and is filled when it found every node.
Each set of GPUs the bid buys from one listing is a fill: one reservation whose ID is the fill ID, listed in the order’s fillIds. The reservation appears shortly after the fill; poll GET /commerce/reservations/ using the fill ID. 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. Available to every member of your organization; approval is not required.
curl --request POST \
--url https://api.ornn.com/v1/markets/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"gpuSlug": "nvidia_h100_sxm",
"nodes": 2,
"orderType": "market"
}
'import requests
url = "https://api.ornn.com/v1/markets/orders"
payload = {
"gpuSlug": "nvidia_h100_sxm",
"nodes": 2,
"orderType": "market"
}
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', nodes: 2, orderType: 'market'})
};
fetch('https://api.ornn.com/v1/markets/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/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',
'nodes' => 2,
'orderType' => 'market'
]),
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/orders"
payload := strings.NewReader("{\n \"gpuSlug\": \"nvidia_h100_sxm\",\n \"nodes\": 2,\n \"orderType\": \"market\"\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/orders")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"gpuSlug\": \"nvidia_h100_sxm\",\n \"nodes\": 2,\n \"orderType\": \"market\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/v1/markets/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 \"nodes\": 2,\n \"orderType\": \"market\"\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",
"saleType": "spot",
"region": null,
"side": "bid",
"orderType": "limit",
"pricePerGpuHourMicroUsd": 2500000,
"requested": 16,
"remaining": 16,
"filledNodes": 0,
"filledGpus": 0,
"fillIds": [],
"status": "resting",
"cancelReason": null,
"createdAt": "2026-10-14T18:30:00.000Z",
"isMine": true,
"isSeller": false
}
}{
"order": {
"orderId": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa",
"orderBookId": "bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbbb",
"gpuSlug": "nvidia_h100_sxm",
"saleType": "spot",
"region": null,
"side": "bid",
"orderType": "market",
"pricePerGpuHourMicroUsd": null,
"requested": 16,
"remaining": 0,
"filledNodes": 2,
"filledGpus": 16,
"fillIds": [
"dddddddd-dddd-4ddd-8ddd-dddddddddddd"
],
"status": "filled",
"cancelReason": null,
"createdAt": "2026-10-14T18:30:00.000Z",
"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 order book for that GPU type."
}
}{
"detail": {
"code": "idempotency_conflict",
"message": "That request key was already used for a different request."
}
}{
"detail": {
"code": "nodes_need_market_order",
"message": "Buy nodes with a market order. A limit bid takes a number of GPUs."
}
}{
"code": "<string>",
"detail": "<string>"
}ornn market bid --gpu-slug <gpu-slug> --nodes 2 --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
Send exactly one of gpus or nodes; nodes needs orderType market.
Catalog GPU slug of the order book.
limit takes capacity at or below your price and rests the rest until it fills or you cancel. market takes what is for sale now and cancels the rest.
limit, market spot: a reservation on the node can end the VM. on-demand: only a stop or the listing's end ends it.
spot, on-demand A region with an order book, for example us-east-11 (see GET /v1/markets/books). Omit to fill at any location. A region without a book is refused with unknown_region.
GPUs, taken from the lowest asks first; one node can supply part of them and a bid can span nodes. Send this or nodes.
x >= 1Distinct nodes with a GPU free, each giving every GPU free on it. Market orders only (nodes_need_market_order on a limit). Send this or gpus.
x >= 1Required 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 >= 1The disk every VM boots, from your disks or Ornn's. Omit to boot your newest disk, else Ornn's newest.
Response
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?