---
title: "Estimate an order"
method: POST
path: "/preview/v2/order_preview"
tags: ["Orders"]
---

# Estimate an order

`POST /preview/v2/order_preview`

> ⚠️ This endpoint is in [public preview](/preview/roadmap).

Estimate a buy or sell order before placing it.

## Request body

- union
  - object
    - `requirements` Requirements, required — Key/value filters on instance SKU properties. Valid keys and values are published at `GET /v2/instance_sku_property_catalog`. Empty map = no constraints.
    - `start_at` integer, required — Unix timestamp.
    - `duration_seconds` integer, required — Order duration in seconds. Must be a positive multiple of 60.
    - `node_count` integer, required — Number of nodes. Must be positive.
    - `pool` string — A resource path like 'sfc:pool:acme:prod:my-pool' _or_ an ID. Resource paths are human-readable but not stable - they change when resources are renamed or moved. IDs are stable and permanent.
    - `side` 'buy', required
  - object
    - `pool` string — A resource path like 'sfc:pool:acme:prod:my-pool' _or_ an ID. Resource paths are human-readable but not stable - they change when resources are renamed or moved. IDs are stable and permanent.
    - `start_at` integer, required — Unix timestamp.
    - `duration_seconds` integer, required — Order duration in seconds. Must be a positive multiple of 60.
    - `node_count` integer, required — Number of nodes. Must be positive.
    - `requirements` Requirements, required — Key/value filters on instance SKU properties. Valid keys and values are published at `GET /v2/instance_sku_property_catalog`. Empty map = no constraints.
    - `side` 'sell', required

## Response `200`

Estimate result.

- union
  - object
    - `post_order_body` V2CreateOrderRequest, required
      - `pool` string, required — A resource path like 'sfc:pool:acme:prod:my-pool' _or_ an ID. Resource paths are human-readable but not stable - they change when resources are renamed or moved. IDs are stable and permanent.
      - `side` 'sell' | 'buy', required
      - `allow_standing` boolean — If true, the order rests on the order book until it fills, is cancelled, or its end time passes. If false, the order is cancelled immediately if it does not fill.
      - `allow_partial` boolean — If true, the order may fill partially — fewer nodes and/or a subset of the requested time window. The filled time may be disjoint.
      - `instance_sku` union, required — Accepts the canonical prefix below; additional legacy prefixes are aliased for read compatibility. Writes always emit the canonical form.
        - string
        - string — Legacy alias prefix; accepted on read, never emitted on write.
      - `allocation_schedule_delta` ScheduleEntry[], required — Node count over time, as a list of `[start_at, end_at)` time ranges. Example: 5 nodes from t=0 to t=3600 is `[{"start_at": 0, "end_at": 3600, "node_count": 5}]`. `start_at` and `end_at` must be 60-second aligned, `node_count` must be non-negative. On non-final entries, `end_at` may be omitted (inferred from the next entry's `start_at`); gaps fill with `node_count: 0`.
        - `start_at` integer, required — Unix timestamp.
        - `end_at` integer — Unix timestamp.
        - `node_count` integer, required
      - `limit_price_dollars_per_node_hour` string, required — Price in dollars per node-hour, encoded as a decimal string. Prices are rounded to the nearest $0.000060/node-hour market tick. This is one microdollar per node-minute. Responses contain the rounded value with six decimal places. Inputs must contain a decimal point, be non-negative, and not exceed $500/node-hour.
    - `fee` V2OrderPreviewFee, required — Fee charged on fills for the targeted instance SKU. Total fee = `flat_dollars_per_node_hour × node_count × duration_hours` + `percentage_bps / 10000 × execution_total_dollars`. Recomputed against the realized price at fill time.
      - `flat_dollars_per_node_hour` string, required — Price in dollars per node-hour, encoded as a decimal string. Prices are rounded to the nearest $0.000060/node-hour market tick. This is one microdollar per node-minute. Responses contain the rounded value with six decimal places. Inputs must contain a decimal point, be non-negative, and not exceed $500/node-hour.
      - `percentage_bps` integer, required — Percentage of execution total, in basis points (10000 = 100%).
    - `notices` V2OrderPreviewNotice[] — Maintenance windows for the matched instance SKU overlapping the order's delivery window.
      - `start_at` integer, required — Unix timestamp.
      - `end_at` integer, required — Unix timestamp.
      - `maintenance_type` 'info' | 'degraded_performance' | 'marketplace_unavailable', required
      - `title` string, required
      - `description` string, required
      - `action_message` string, nullable
      - `type` 'maintenance_window', required
    - `type` 'quoted', required
  - object
    - `reason` 'no_matching_instance_skus' | 'no_availability', required
    - `fee` V2OrderPreviewFee — Fee charged on fills for the targeted instance SKU. Total fee = `flat_dollars_per_node_hour × node_count × duration_hours` + `percentage_bps / 10000 × execution_total_dollars`. Recomputed against the realized price at fill time.
      - `flat_dollars_per_node_hour` string, required — Price in dollars per node-hour, encoded as a decimal string. Prices are rounded to the nearest $0.000060/node-hour market tick. This is one microdollar per node-minute. Responses contain the rounded value with six decimal places. Inputs must contain a decimal point, be non-negative, and not exceed $500/node-hour.
      - `percentage_bps` integer, required — Percentage of execution total, in basis points (10000 = 100%).
    - `notices` V2OrderPreviewNotice[] — Maintenance windows for the targeted instance SKU overlapping the requested order window.
      - `start_at` integer, required — Unix timestamp.
      - `end_at` integer, required — Unix timestamp.
      - `maintenance_type` 'info' | 'degraded_performance' | 'marketplace_unavailable', required
      - `title` string, required
      - `description` string, required
      - `action_message` string, nullable
      - `type` 'maintenance_window', required
    - `type` 'unavailable', required

## Other responses

- `401` — Unauthorized.
- `422` — Validation failed.
- `500` — Internal server error.

---

[API](https://skmtc.dev/sfcompute/apis/sfc-api.md) · [All operations](https://skmtc.dev/sfcompute/apis/sfc-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/sfcompute/sfc-api/revisions/f3ff1539c0d9/schema)
