Create order
⚠️ This endpoint is in public preview.
Place a buy or sell order. Orders fill completely or not at all. All nodes fill on a single instance SKU matching the order’s requirements. 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 capacity that receives compute when filled.
(cap_[0-9a-zA-Z_-]{1,21})|(sfc:capacity:[a-zA-Z0-9._-]+(:[a-zA-Z0-9._-]+){2,2})"cap_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.
Response
Order created.
"order"ordr_[0-9a-zA-Z_-]{1,21}"ordr_k3R-nX9vLm7Qp2Yw5Jd8F"
Target capacity that receives or loses compute if this order fills (depending on order type).
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.
Change in capacity if the order fills. Must be a single time range with both start_at and end_at.
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
Instance SKU this order is pinned to. None for legacy orders that pre-date the move to instance-sku-pinned matching, or for orders stored without an instance_sku requirement. Carries the SKU's human-readable name when one is registered.
Unix timestamp.
1738972800
Node count that filled. Equals the order's quantity for complete fills.
Weighted-average execution price across all fills.
^\d+\.\d+$"2.500000"
Each contract produced by this order. Empty for unfilled orders.
Unix timestamp.
1738972800