> For the complete documentation index, see [llms.txt](https://docs.nebulablock.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nebulablock.com/api-reference/platform-api/list-products/get-spot-price.md). Agents can also search and read this documentation through its [MCP server](https://docs.nebulablock.com/~gitbook/mcp).

# Get Spot Price

Get the current spot rate a stopped or preempted Spot instance would restart at.

Return the current hourly spot rate for a Spot instance, next to the rate it was running at. Use it before [starting](https://docs.nebulablock.com/api-reference/platform-api/list-products/start-instance.md) a stopped or preempted Spot instance to see what it will cost. While the instance is preempted it is billed only for storage; its current billing rate is `billing_price_per_hour` in [Get Instance](https://docs.nebulablock.com/api-reference/platform-api/list-products/get-instance.md). See [Spot Instances](https://docs.nebulablock.com/products/gpu-cloud/spot-instances.md) for how spot pricing works.

## HTTP Request

`GET` `{API_URL}/computing/instance/{id}/spot-price`

## Path parameters

| Parameters | Requirements | Type     | Description                                                                                                                                           |
| ---------- | ------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| id         | Required     | `string` | The unique identifier of the instance, from [List Instances](https://docs.nebulablock.com/api-reference/platform-api/list-products/list-instances.md) |

> **Note:** An unknown id is rejected with **HTTP 404** `Instance not found`, and an instance belonging to someone else with **HTTP 403** `Permission denied`. Those are the only real HTTP errors here — every other failure below comes back as HTTP 200.

> **Important:** Only Spot instances (`is_spot: true`) have a spot price. For any other instance the call returns **HTTP 200** with `"status": "failed"` and the message `"Not a spot instance"`.

> **Note:** If the current spot rate cannot be retrieved, the call returns **HTTP 200** with `"status": "failed"` and the message `"Resource not available, please try again later"`. Retry after a short wait.

## Response Attributes

#### data `object`

* **current\_price\_per\_hour** `number`: The current spot rate in USD per hour — what the instance would run at if started now. Pass this as `accepted_price_per_hour` to [Start Instance](https://docs.nebulablock.com/api-reference/platform-api/list-products/start-instance.md).
* **order\_price\_per\_hour** `number`: The rate in USD per hour the instance was last running at.

The spot rate can change at any time, so treat `current_price_per_hour` as a quote, not a reservation. If it rises above the price you accept before the instance starts, Start Instance asks you to confirm again.

#### message `string`

A description of the status of the request.

#### status `string`

Indicates the result of the request. `success` signifies success, while `failed` indicates an error.

## Example

#### Request

```bash
curl -X GET '{API_URL}/computing/instance/{id}/spot-price' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'Content-Type: application/json'
```

#### Response

```json
{
    "data": {
        "current_price_per_hour": 2.35,
        "order_price_per_hour": 2.1
    },
    "message": "success",
    "status": "success"
}
```
