Create order
Place a buy or sell order.
Authorizations
Create an API token using sf tokens create or at https://sfcompute.com/dashboard/tokens.
Headers
Unique key to ensure idempotent order creation. If provided, duplicate requests with the same key will not place a new order and return the original order.
Body
Target pool that receives compute when filled.
(pool_[0-9a-zA-Z_-]{1,21})|(sfc:pool:[a-zA-Z0-9._-]+(:[a-zA-Z0-9._-]+){2,2})"pool_k3R-nX9vLm7Qp2Yw5Jd8F"
sell, buy 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.
If true, the order may fill partially — fewer nodes and/or a subset of the requested time window. The filled time may be disjoint.
SKU this order will fill on. Rejected at submission if the SKU id is not registered. Any id spelling is accepted.
sku_[0-9a-zA-Z_-]{1,21}"sku_k3R-nX9vLm7Qp2Yw5Jd8F"
Change in capacity if the order fills (added on buy, subtracted on sell). Must be a single time range: one node_count held constant from start_at to end_at, with both set. start_at and end_at are Unix timestamps in seconds on the allocation schedule grid; start_at can also be the current time. node_count must be between 1 and 10000.
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.
^\d+\.\d+$"18.000000"
Preview. Buy orders only. Compute this order fills is listed for sale from the same pool at this price, as standing sell orders that allow partial fills. Must be greater than limit_price_dollars_per_node_hour.
When one of those sell orders fills, the pool loses that time and its instances terminate in priority order, lowest first. Sell fees apply. Cancelling this order leaves listed sell orders on the order book. A price below compute_limit_offset_price_ceiling_dollars_per_node_hour from GET /preview/v2/platform_constants exempts this order from your compute limit.
^\d+\.\d+$"18.000000"
Response
Order created.
"order"ordr_[0-9a-zA-Z_-]{1,21}"ordr_k3R-nX9vLm7Qp2Yw5Jd8F"
Target pool that receives or loses compute if this order fills (depending on order type).
Workspace that owns the order's pool.
sell, buy If true, the order stays in the order book until either fills, is explicitly cancelled, or the order end time is reached resulting in automatic cancellation. If false, the order is cancelled immediately if it doesn't fill.
SKU this order is pinned to. Carries the SKU's human-readable name when one is registered.
Change in capacity if the order fills. Must be a single time range with both start_at and end_at.
The total portion of the requested schedule that has filled. Once state is cancelled, this is final and remains available on later get and list responses. Empty for orders with no fills; the unfilled remainder is allocation_schedule_delta minus this.
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.
^\d+\.\d+$"18.000000"
Current state of the order.
pending, filled, partially_filled, rejected, cancelled, standing Unix timestamp.
1738972800
If true, the order may fill partially — fewer nodes and/or a subset of the requested time window.
Unix timestamp.
1738972800
Complete list of contracts produced by this order. Once state is cancelled, this list is final and remains available on later get and list responses. Omitted for orders with no fills.
Unix timestamp.
1738972800
Preview. Buy orders only. Compute this order fills is listed for sale at this price. Greater than limit_price_dollars_per_node_hour. Omitted when unset.
^\d+\.\d+$"18.000000"