> ## 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.

# Resell Lease

> Create a resell order for unused GPU time

## Path Parameters

<ParamField path="lease_id" type="string" required>
  The lease ID to resell
</ParamField>

## Request Body

<ParamField body="limit_price" type="number" required>
  Price per GPU/hour for resale
</ParamField>

<ParamField body="available_from" type="string">
  When the lease becomes available for transfer (ISO 8601 format). Default: now
</ParamField>

<ParamField body="available_until" type="string">
  When the resell order expires (ISO 8601 format). Default: lease end time
</ParamField>

<ParamField body="transfer_immediately" type="boolean" default="false">
  Transfer immediately when matched (terminates your access right away)
</ParamField>

## Response

<ResponseField name="order_id" type="string">
  The resell order ID
</ResponseField>

<ResponseField name="potential_recovery" type="number">
  Estimated recovery amount before platform fee
</ResponseField>

<ResponseField name="net_recovery" type="number">
  Estimated recovery amount after 10% platform fee
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.galadriel.com/v1/leases/lse_xyz123/resell \
    -H "Authorization: Bearer YOUR_API_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "limit_price": 1.20,
      "available_from": "2025-11-12T14:00:00Z",
      "transfer_immediately": false
    }'
  ```

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

  response = requests.post(
      "https://api.galadriel.com/v1/leases/lse_xyz123/resell",
      headers={
          "Authorization": "Bearer YOUR_API_TOKEN",
          "Content-Type": "application/json"
      },
      json={
          "limit_price": 1.20,
          "available_from": "2025-11-12T14:00:00Z",
          "transfer_immediately": False
      }
  )

  result = response.json()
  print(f"Resell order: {result['order_id']}")
  print(f"Potential recovery: ${result['potential_recovery']}")
  print(f"After 10% fee: ${result['net_recovery']}")
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.galadriel.com/v1/leases/lse_xyz123/resell',
    {
      method: 'POST',
      headers: {
        'Authorization': 'Bearer YOUR_API_TOKEN',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        limit_price: 1.20,
        available_from: '2025-11-12T14:00:00Z',
        transfer_immediately: false
      })
    }
  );

  const result = await response.json();
  console.log(`Resell order: ${result.order_id}`);
  console.log(`Potential recovery: $${result.potential_recovery}`);
  console.log(`After 10% fee: $${result.net_recovery}`);
  ```
</RequestExample>

<ResponseExample>
  ```json Pending (Waiting for Buyer) theme={null}
  {
    "order_id": "ord_resell123",
    "lease_id": "lse_xyz123",
    "limit_price": 1.20,
    "status": "pending",
    "available_from": "2025-11-12T14:00:00Z",
    "available_until": "2025-11-14T14:00:00Z",
    "remaining_hours": 48,
    "potential_recovery": 921.60,
    "platform_fee": 92.16,
    "net_recovery": 829.44,
    "created_at": "2025-11-11T14:00:00Z"
  }
  ```

  ```json Immediately Matched theme={null}
  {
    "order_id": "ord_resell123",
    "lease_id": "lse_xyz123",
    "limit_price": 1.20,
    "status": "filled",
    "matched_at": "2025-11-11T14:00:01Z",
    "buyer_order_id": "ord_buyer789",
    "remaining_hours": 48,
    "sale_amount": 921.60,
    "platform_fee": 92.16,
    "net_recovery": 829.44,
    "original_refund": 998.40,
    "total_recovery": 1827.84,
    "transfer_time": "2025-11-12T14:00:00Z"
  }
  ```
</ResponseExample>

## Notes

<Note>
  You receive both the original refund from Galadriel AND the net proceeds from the resale (minus 10% platform fee).
</Note>

<Warning>
  Once a resell order is matched, the transfer cannot be cancelled. Make sure you're ready to give up access at the specified time.
</Warning>
