> ## Documentation Index
> Fetch the complete documentation index at: https://docs.galadriel.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Order

> Retrieve details of a specific order

## Path Parameters

<ParamField path="order_id" type="string" required>
  The order ID to retrieve
</ParamField>

## Response

<ResponseField name="order_id" type="string">
  Unique order identifier
</ResponseField>

<ResponseField name="status" type="string">
  Order status: `pending`, `partial`, `filled`, or `cancelled`
</ResponseField>

<ResponseField name="matches" type="array">
  Array of matched orders (for partial/filled orders)
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl https://api.galadriel.com/v1/orders/ord_abc123 \
    -H "Authorization: Bearer YOUR_API_TOKEN"
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.galadriel.com/v1/orders/ord_abc123",
      headers={"Authorization": "Bearer YOUR_API_TOKEN"}
  )

  order = response.json()
  print(f"Status: {order['status']}")
  print(f"Filled: {order['filled_gpus']}/{order['gpu_count']} GPUs")
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.galadriel.com/v1/orders/ord_abc123',
    {
      headers: {
        'Authorization': 'Bearer YOUR_API_TOKEN'
      }
    }
  );

  const order = await response.json();
  console.log(`Status: ${order.status}`);
  console.log(`Filled: ${order.filled_gpus}/${order.gpu_count} GPUs`);
  ```
</RequestExample>

<ResponseExample>
  ```json Filled Order theme={null}
  {
    "order_id": "ord_abc123",
    "side": "buy",
    "gpu_type": "h100",
    "gpu_count": 16,
    "zone": "us-west-1",
    "duration_hours": 24,
    "order_type": "limit",
    "limit_price": 1.30,
    "status": "filled",
    "filled_gpus": 16,
    "avg_price": 1.30,
    "total_cost": 499.20,
    "created_at": "2025-11-11T14:00:00Z",
    "filled_at": "2025-11-11T14:30:00Z",
    "matches": [
      {
        "matched_at": "2025-11-11T14:30:00Z",
        "gpus": 16,
        "price": 1.30,
        "lease_id": "lse_xyz123"
      }
    ]
  }
  ```

  ```json Pending Order theme={null}
  {
    "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.25,
    "status": "pending",
    "filled_gpus": 0,
    "created_at": "2025-11-11T14:00:00Z",
    "expires_at": "2025-11-11T18:00:00Z"
  }
  ```
</ResponseExample>
