Skip to main content
POST
Estimate an order

Authorizations

Authorization
string
header
required

Create an API token using sf tokens create or at https://sfcompute.com/dashboard/tokens.

Body

application/json
requirements
object
required

Key/value filters on instance SKU properties.

Keys are the property names instance SKUs carry on GET /v2/instance_skus (e.g. accelerator); values match each property's value spelling. The reserved instance_sku key pins to a single SKU by id.

Empty map = no constraints.

Example:
start_at
integer<int64>
required

Order start. Must align to a 60-second boundary.

Example:

1738972800

duration_seconds
integer<u-int64>
required

Order duration in seconds. Must be a positive multiple of 60.

Required range: x >= 0
node_count
integer<int32>
required

Number of nodes. Must be positive.

side
string
default:buy
required
Allowed value: "buy"
pool
null | string

Pool that receives compute when the order fills. Omit to get an estimate without pinning to a pool. The response body then returns a placeholder you must replace before submitting to /v2/orders.

Pattern: (pool_[0-9a-zA-Z_-]{1,21})|(sfc:pool:[a-zA-Z0-9._-]+(:[a-zA-Z0-9._-]+){2,2})
Example:

"pool_k3R-nX9vLm7Qp2Yw5Jd8F"

allow_partial
boolean

If true, the estimate models an order that may fill partially — fewer nodes and/or a subset of the requested time window — instead of one that fills completely or not at all. Send the same value you will send as allow_partial on POST /v2/orders, or the estimate answers for a different order than the one you place. Absent means all-or-nothing.

Response

Estimate result.

post_order_body
object
required

Ready-to-submit body for POST /v2/orders, priced at the estimated rate. It is an estimate, not a promise to fill: the market can move before you post it, and when the match combines resting orders at different prices, posting it verbatim can fill less than estimated or nothing at all. For an allow_partial estimate that matched only part of the order, the price is the rate over the part that matched.

fee
object
required

Fee policy for the matched instance SKU.

type
string
default:quoted
required
Allowed value: "quoted"
matched_node_minutes
integer<int64> | null

Node-minutes the quoted rate was derived over, present only when the estimate matched part of the order rather than all of it. To estimate the execution total, multiply the rate by this area in node-hours (matched_node_minutes / 60), not by the full allocation_schedule_delta rectangle.

When absent, the whole order matched and the rectangle is the area to price. For a buy the product can overstate the execution total: its rate is derived over the order's remaining window less one minute, so it still clears if placement lands a minute later.

A partial quote's rate is rounded down for a sell and up for a buy, which puts the product within $0.000001 per matched node-minute of the exact total.

Treat this area as an estimate rather than a guarantee: when the match combines resting orders at different prices, posting the quoted rate as a limit may fill less than this.

notices
object[]

Maintenance windows for the matched instance SKU overlapping the order's delivery window.