curl -X POST https://api.galadriel.com/v1/orders \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"side": "buy",
"gpu_type": "h100",
"gpu_count": 16,
"zone": "us-west-1",
"duration_hours": 24,
"order_type": "limit",
"limit_price": 1.30
}'
import requests
response = requests.post(
"https://api.galadriel.com/v1/orders",
headers={
"Authorization": "Bearer YOUR_API_TOKEN",
"Content-Type": "application/json"
},
json={
"side": "buy",
"gpu_type": "h100",
"gpu_count": 16,
"zone": "us-west-1",
"duration_hours": 24,
"order_type": "limit",
"limit_price": 1.30
}
)
order = response.json()
print(f"Order ID: {order['order_id']}")
const response = await fetch('https://api.galadriel.com/v1/orders', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
side: 'buy',
gpu_type: 'h100',
gpu_count: 16,
zone: 'us-west-1',
duration_hours: 24,
order_type: 'limit',
limit_price: 1.30
})
});
const order = await response.json();
console.log(`Order ID: ${order.order_id}`);
{
"order_id": "ord_abc123",
"side": "buy",
"gpu_type": "h100",
"gpu_count": 16,
"zone": "us-west-1",
"duration_hours": 24,
"order_type": "market",
"status": "filled",
"matched_price": 1.40,
"total_cost": 537.60,
"lease_id": "lse_xyz123",
"created_at": "2025-11-11T14:00:00Z",
"filled_at": "2025-11-11T14:00:01Z"
}
{
"order_id": "ord_def456",
"side": "buy",
"gpu_type": "h100",
"gpu_count": 16,
"zone": "us-west-1",
"duration_hours": 24,
"order_type": "limit",
"limit_price": 1.30,
"status": "pending",
"created_at": "2025-11-11T14:00:00Z",
"expires_at": "2025-11-11T18:00:00Z"
}
Orders
Create Order
Create a new buy or sell order in the marketplace
POST
/
v1
/
orders
curl -X POST https://api.galadriel.com/v1/orders \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"side": "buy",
"gpu_type": "h100",
"gpu_count": 16,
"zone": "us-west-1",
"duration_hours": 24,
"order_type": "limit",
"limit_price": 1.30
}'
import requests
response = requests.post(
"https://api.galadriel.com/v1/orders",
headers={
"Authorization": "Bearer YOUR_API_TOKEN",
"Content-Type": "application/json"
},
json={
"side": "buy",
"gpu_type": "h100",
"gpu_count": 16,
"zone": "us-west-1",
"duration_hours": 24,
"order_type": "limit",
"limit_price": 1.30
}
)
order = response.json()
print(f"Order ID: {order['order_id']}")
const response = await fetch('https://api.galadriel.com/v1/orders', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
side: 'buy',
gpu_type: 'h100',
gpu_count: 16,
zone: 'us-west-1',
duration_hours: 24,
order_type: 'limit',
limit_price: 1.30
})
});
const order = await response.json();
console.log(`Order ID: ${order.order_id}`);
{
"order_id": "ord_abc123",
"side": "buy",
"gpu_type": "h100",
"gpu_count": 16,
"zone": "us-west-1",
"duration_hours": 24,
"order_type": "market",
"status": "filled",
"matched_price": 1.40,
"total_cost": 537.60,
"lease_id": "lse_xyz123",
"created_at": "2025-11-11T14:00:00Z",
"filled_at": "2025-11-11T14:00:01Z"
}
{
"order_id": "ord_def456",
"side": "buy",
"gpu_type": "h100",
"gpu_count": 16,
"zone": "us-west-1",
"duration_hours": 24,
"order_type": "limit",
"limit_price": 1.30,
"status": "pending",
"created_at": "2025-11-11T14:00:00Z",
"expires_at": "2025-11-11T18:00:00Z"
}
Request Body
string
required
Order side:
buy or sellstring
required
GPU type:
h100, h200, b200, or b300integer
required
Number of GPUs (must be multiple of 8)
string
required
Availability zone:
us-west-1, us-east-1, or eu-west-1integer
required
Lease duration in hours (1-720)
string
default:"market"
Order type:
market or limitnumber
Price per GPU/hour (required for limit orders)
string
Start time in ISO 8601 format (default: now)
integer
Flexible execution window in hours (enables flexible pricing)
Response
string
Unique order identifier
string
Order status:
pending, partial, filled, or cancellednumber
Actual matched price per GPU/hour
string
Lease ID (if order filled immediately)
curl -X POST https://api.galadriel.com/v1/orders \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"side": "buy",
"gpu_type": "h100",
"gpu_count": 16,
"zone": "us-west-1",
"duration_hours": 24,
"order_type": "limit",
"limit_price": 1.30
}'
import requests
response = requests.post(
"https://api.galadriel.com/v1/orders",
headers={
"Authorization": "Bearer YOUR_API_TOKEN",
"Content-Type": "application/json"
},
json={
"side": "buy",
"gpu_type": "h100",
"gpu_count": 16,
"zone": "us-west-1",
"duration_hours": 24,
"order_type": "limit",
"limit_price": 1.30
}
)
order = response.json()
print(f"Order ID: {order['order_id']}")
const response = await fetch('https://api.galadriel.com/v1/orders', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
side: 'buy',
gpu_type: 'h100',
gpu_count: 16,
zone: 'us-west-1',
duration_hours: 24,
order_type: 'limit',
limit_price: 1.30
})
});
const order = await response.json();
console.log(`Order ID: ${order.order_id}`);
{
"order_id": "ord_abc123",
"side": "buy",
"gpu_type": "h100",
"gpu_count": 16,
"zone": "us-west-1",
"duration_hours": 24,
"order_type": "market",
"status": "filled",
"matched_price": 1.40,
"total_cost": 537.60,
"lease_id": "lse_xyz123",
"created_at": "2025-11-11T14:00:00Z",
"filled_at": "2025-11-11T14:00:01Z"
}
{
"order_id": "ord_def456",
"side": "buy",
"gpu_type": "h100",
"gpu_count": 16,
"zone": "us-west-1",
"duration_hours": 24,
"order_type": "limit",
"limit_price": 1.30,
"status": "pending",
"created_at": "2025-11-11T14:00:00Z",
"expires_at": "2025-11-11T18:00:00Z"
}