curl --request POST \
--url https://api.sfcompute.com/v2/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"capacity": "<string>",
"side": "sell",
"delta": {
"node_count": 2,
"start_at": 1738972800,
"end_at": 1738972800
},
"limit_price_dollars_per_node_hour": "<string>",
"allow_standing": true
}
'{
"object": "order",
"id": "<string>",
"capacity": "cap_k3R-nX9vLm7Qp2Yw5Jd8F",
"side": "sell",
"allow_standing": true,
"zones": [
"richmond"
],
"delta": {
"node_count": 2,
"start_at": 1738972800,
"end_at": 1738972800,
"type": "rectangle"
},
"limit_price_dollars_per_node_hour": "<string>",
"status": "pending",
"created_at": 1738972800,
"filled_at": 1738972800,
"filled_price_dollars_per_node_hour": "2.500000",
"cancelled_at": 1738972800
}Place a buy or sell order. Orders fill completely or not at all. All nodes fill in a single zone. Order filling is asynchronous; poll GET /v2/orders/{id} to check status.
curl --request POST \
--url https://api.sfcompute.com/v2/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"capacity": "<string>",
"side": "sell",
"delta": {
"node_count": 2,
"start_at": 1738972800,
"end_at": 1738972800
},
"limit_price_dollars_per_node_hour": "<string>",
"allow_standing": true
}
'{
"object": "order",
"id": "<string>",
"capacity": "cap_k3R-nX9vLm7Qp2Yw5Jd8F",
"side": "sell",
"allow_standing": true,
"zones": [
"richmond"
],
"delta": {
"node_count": 2,
"start_at": 1738972800,
"end_at": 1738972800,
"type": "rectangle"
},
"limit_price_dollars_per_node_hour": "<string>",
"status": "pending",
"created_at": 1738972800,
"filled_at": 1738972800,
"filled_price_dollars_per_node_hour": "2.500000",
"cancelled_at": 1738972800
}Create an API token using sf tokens create or at https://sfcompute.com/account/api-keys.
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.
Target capacity that receives compute when filled.
(cap_[0-9a-zA-Z_-]{1,21})|(sfc:capacity:[a-zA-Z0-9._-]+(:[a-zA-Z0-9._-]+){1,3})"cap_k3R-nX9vLm7Qp2Yw5Jd8F"
sell, buy The desired change in capacity. Will be added if side is buy, subtracted if side is sell if the order fills.
Show child attributes
Must contain decimal point. Will be rounded to nearest multiple of $0.000060.
^\d+\.\d+$"2.500000"
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.
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).
cap_[0-9a-zA-Z_-]{1,21}"cap_k3R-nX9vLm7Qp2Yw5Jd8F"
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.
Datacenter locations this order can fill in (derived from target capacity at order creation by default).
1The desired change in capacity. Will be added if side is buy, subtracted if side is sell if the order fills.
Show child attributes
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.
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, rejected, cancelled, standing Unix timestamp.
1738972800
Unix timestamp.
1738972800
Price rate in dollars per node-hour.
^\d+\.\d+$"2.500000"
Unix timestamp.
1738972800