Skip to main content
GET
https://api.galadriel.com
/
v1
/
orderbook
curl "https://api.galadriel.com/v1/orderbook?gpu_type=h100&zone=us-west-1&depth=10" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "gpu_type": "h100",
  "zone": "us-west-1",
  "timestamp": "2025-11-11T14:00:00Z",
  "market_depth": {
    "best_bid": 1.30,
    "best_ask": 1.40,
    "spread": 0.10,
    "mid_price": 1.35
  },
  "bids": [
    {
      "price": 1.30,
      "gpus": 24,
      "orders": 3
    },
    {
      "price": 1.25,
      "gpus": 16,
      "orders": 2
    },
    {
      "price": 1.20,
      "gpus": 32,
      "orders": 4
    }
  ],
  "asks": [
    {
      "price": 1.40,
      "gpus": 16,
      "orders": 2
    },
    {
      "price": 1.45,
      "gpus": 8,
      "orders": 1
    },
    {
      "price": 1.50,
      "gpus": 24,
      "orders": 3
    }
  ],
  "last_trade": {
    "price": 1.35,
    "gpus": 8,
    "timestamp": "2025-11-11T13:55:00Z"
  },
  "volume_24h": 1920
}

Query Parameters

gpu_type
string
required
GPU type: h100, h200, b200, or b300
zone
string
required
Availability zone: us-west-1, us-east-1, or eu-west-1
depth
integer
default:"10"
Number of price levels to return (max: 50)

Response

market_depth
object
Current market depth with best bid/ask prices
bids
array
Array of buy orders (highest price first)
asks
array
Array of sell orders (lowest price first)
curl "https://api.galadriel.com/v1/orderbook?gpu_type=h100&zone=us-west-1&depth=10" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "gpu_type": "h100",
  "zone": "us-west-1",
  "timestamp": "2025-11-11T14:00:00Z",
  "market_depth": {
    "best_bid": 1.30,
    "best_ask": 1.40,
    "spread": 0.10,
    "mid_price": 1.35
  },
  "bids": [
    {
      "price": 1.30,
      "gpus": 24,
      "orders": 3
    },
    {
      "price": 1.25,
      "gpus": 16,
      "orders": 2
    },
    {
      "price": 1.20,
      "gpus": 32,
      "orders": 4
    }
  ],
  "asks": [
    {
      "price": 1.40,
      "gpus": 16,
      "orders": 2
    },
    {
      "price": 1.45,
      "gpus": 8,
      "orders": 1
    },
    {
      "price": 1.50,
      "gpus": 24,
      "orders": 3
    }
  ],
  "last_trade": {
    "price": 1.35,
    "gpus": 8,
    "timestamp": "2025-11-11T13:55:00Z"
  },
  "volume_24h": 1920
}

Using Orderbook Data

The orderbook helps you make informed pricing decisions:
# Check if there's enough liquidity for your order
gpus_needed = 16
available = sum(level['gpus'] for level in orderbook['asks'])

if available >= gpus_needed:
    print("Sufficient liquidity for market order")
    best_price = orderbook['market_depth']['best_ask']
else:
    print("Insufficient liquidity, consider limit order")

# Calculate estimated cost for market order
cost = 0
remaining = gpus_needed
for level in orderbook['asks']:
    if remaining <= 0:
        break
    take = min(remaining, level['gpus'])
    cost += take * level['price'] * 24  # 24 hour lease
    remaining -= take

print(f"Estimated cost for market order: ${cost}")