Create order
⚠️ This endpoint is in public preview.
Place a buy or sell order. Orders fill on a single instance SKU matching the order’s requirements. By default orders fill completely or not at all; set allow_partial to permit a partial fill. Order filling is asynchronous; poll GET /v2/orders/{id} to check status.
Authorizations
Create an API token using sf tokens create or at https://sfcompute.com/account/api-keys.
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 Instance SKU this order will fill on. Rejected at submission if the SKU id is not registered.
isku_[0-9a-zA-Z_-]{1,21}"isku_k3R-nX9vLm7Qp2Yw5Jd8F"
Change in capacity if the order fills (added on buy, subtracted on sell). Must be a single time range with both start_at and end_at.
Limit price per node-hour. Decimal string (e.g. "1.500000"); rounded to per-minute precision on submission.
^\d+\.\d+$"2.500000"
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.
Response
Order created.
"order"ordr_[0-9a-zA-Z_-]{1,21}"ordr_k3R-nX9vLm7Qp2Yw5Jd8F"
Deprecated — use pool. Target pool that receives or loses compute if this order fills (depending on order type).
A pool referenced by id and name.
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.
Instance 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 portion of the requested schedule that has filled so far. Empty for orders with no fills yet; the unfilled remainder is allocation_schedule_delta minus this.
Price rate in dollars per node-hour.
^\d+\.\d+$"2.500000"
The status of an order in the system.
pending = not resolved/processed yet.
filled = order executed.
partially_filled = the order matched part of its requested capacity and remains active for the remainder.
standing = the order is waiting for a match.
cancelled = the order was cancelled either automatically (not a standing order and didn't immediately fill, or current time past end_at) or by explicit cancellation.
rejected = validation/system error occurred.
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.
Principal that placed the order — the human user when known, otherwise the API token that placed it. null for orders that predate attribution. Always present (value-or-null) like other order attributes, since every order conceptually has a creator.
Unix timestamp.
1738972800
Weighted-average execution price across all fills.
^\d+\.\d+$"2.500000"
Each contract produced by this order. Empty for unfilled orders.
Unix timestamp.
1738972800