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
}
View the current orderbook for a GPU type and zone
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
}
h100, h200, b200, or b300us-west-1, us-east-1, or eu-west-1curl "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
}
# 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}")