curl --request GET \
--url https://api.ornn.com/v1/markets/books \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ornn.com/v1/markets/books"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ornn.com/v1/markets/books', 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/books",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/books"
req, _ := http.NewRequest("GET", 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.get("https://api.ornn.com/v1/markets/books")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/v1/markets/books")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"orderBooks": [
{
"gpuSlug": "nvidia_h100_sxm",
"saleType": "spot",
"region": "us-east-11",
"orderBookId": "bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbbb",
"bestAskPricePerGpuHourMicroUsd": 2650000,
"bestBidPricePerGpuHourMicroUsd": 2300000
},
{
"gpuSlug": "nvidia_h100_sxm",
"saleType": "spot",
"region": "any",
"orderBookId": "cccccccc-cccc-4ccc-8ccc-cccccccccccc",
"bestAskPricePerGpuHourMicroUsd": null,
"bestBidPricePerGpuHourMicroUsd": 2400000
}
]
}{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}List order books
Returns one order book per GPU type, sale type (spot or on-demand) and location, with its best ask and best bid. A location is a region slug such as us-east-11; the book with region any holds bids that take any location. Asks show what a buyer pays and bids show what a seller receives, so both already account for Ornn’s fees. Prices are integer micro-USD per GPU-hour. Open to every member of your organization.
curl --request GET \
--url https://api.ornn.com/v1/markets/books \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ornn.com/v1/markets/books"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ornn.com/v1/markets/books', 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/books",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/books"
req, _ := http.NewRequest("GET", 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.get("https://api.ornn.com/v1/markets/books")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/v1/markets/books")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"orderBooks": [
{
"gpuSlug": "nvidia_h100_sxm",
"saleType": "spot",
"region": "us-east-11",
"orderBookId": "bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbbb",
"bestAskPricePerGpuHourMicroUsd": 2650000,
"bestBidPricePerGpuHourMicroUsd": 2300000
},
{
"gpuSlug": "nvidia_h100_sxm",
"saleType": "spot",
"region": "any",
"orderBookId": "cccccccc-cccc-4ccc-8ccc-cccccccccccc",
"bestAskPricePerGpuHourMicroUsd": null,
"bestBidPricePerGpuHourMicroUsd": 2400000
}
]
}{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}ornn market books. See Rent GPUs on Spot for the complete bid flow.Authorizations
Create an organization API key in Account Settings > Developer. Do not send this key to the Kubernetes API server.
Query Parameters
Only books for this catalog GPU slug.
Only books of this sale type.
spot, on-demand Only books at this region slug, or any for the books of bids at any location.
Response
Order books by GPU type, sale type and location.
Show child attributes
Show child attributes
Was this page helpful?