curl --request GET \
--url https://api.ornn.com/v1/markets/books/{gpuSlug} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ornn.com/v1/markets/books/{gpuSlug}"
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/{gpuSlug}', 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/{gpuSlug}",
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/{gpuSlug}"
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/{gpuSlug}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/v1/markets/books/{gpuSlug}")
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{
"gpuSlug": "nvidia_h100_sxm",
"saleType": "spot",
"region": "us-east-11",
"orderBookId": "bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbbb",
"asks": [
{
"pricePerGpuHourMicroUsd": 2650000,
"nodes": 2,
"gpus": 16,
"orders": 2
},
{
"pricePerGpuHourMicroUsd": 2900000,
"nodes": 1,
"gpus": 8,
"orders": 1
}
],
"bids": [
{
"pricePerGpuHourMicroUsd": 2300000,
"nodes": 3,
"gpus": null,
"orders": 1
}
]
}{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}{
"detail": {
"code": "order_book_not_found",
"message": "There is no order book for that GPU type."
}
}{
"code": "<string>",
"detail": "<string>"
}Get order book depth
Returns aggregated depth for one GPU type and sale type: whole nodes and order counts at each price level, up to 50 levels per side. Ask levels also count their GPUs; a bid takes nodes of any size, so bid levels have none. With a region, asks are that location’s and bids include those that take any location; without one, depth spans every location. Depth never identifies who placed an order.
curl --request GET \
--url https://api.ornn.com/v1/markets/books/{gpuSlug} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ornn.com/v1/markets/books/{gpuSlug}"
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/{gpuSlug}', 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/{gpuSlug}",
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/{gpuSlug}"
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/{gpuSlug}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/v1/markets/books/{gpuSlug}")
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{
"gpuSlug": "nvidia_h100_sxm",
"saleType": "spot",
"region": "us-east-11",
"orderBookId": "bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbbb",
"asks": [
{
"pricePerGpuHourMicroUsd": 2650000,
"nodes": 2,
"gpus": 16,
"orders": 2
},
{
"pricePerGpuHourMicroUsd": 2900000,
"nodes": 1,
"gpus": 8,
"orders": 1
}
],
"bids": [
{
"pricePerGpuHourMicroUsd": 2300000,
"nodes": 3,
"gpus": null,
"orders": 1
}
]
}{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}{
"detail": {
"code": "order_book_not_found",
"message": "There is no order book for that GPU type."
}
}{
"code": "<string>",
"detail": "<string>"
}ornn market book --gpu-slug <gpu-slug>.Authorizations
Create an organization API key in Account Settings > Developer. Do not send this key to the Kubernetes API server.
Path Parameters
Catalog GPU slug of the order book, from List order books.
Query Parameters
spot (the default): a reservation on the node can end the VM. on-demand: only you, the seller 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 for every location.
Response
Order book depth.
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 The location the depth is for; null when it spans every location.
The location's book; null when locations are combined.
Up to 50 ask levels, lowest price first.
Show child attributes
Show child attributes
Up to 50 bid levels, highest price first.
Show child attributes
Show child attributes
Was this page helpful?