curl --request POST \
--url https://api.sfcompute.com/v2/procurements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"target": "node_count",
"capacity": "<string>",
"min_sell_price_dollars_per_node_hour": "<string>",
"max_buy_price_dollars_per_node_hour": "<string>",
"managed_window_minutes": 750,
"name": "my-resource-name",
"enabled": true
}
'{
"id": "<string>",
"resource_path": "<string>",
"owner": "<string>",
"workspace": "<string>",
"name": "<string>",
"object": "procurement",
"target": "node_count",
"capacity": "cap_k3R-nX9vLm7Qp2Yw5Jd8F",
"min_sell_price_dollars_per_node_hour": "<string>",
"max_buy_price_dollars_per_node_hour": "<string>",
"managed_window_minutes": 750,
"enabled": true,
"status": {
"state": "info",
"message": "<string>"
},
"created_at": 1738972800,
"updated_at": 1738972800
}Create a market automation that maintains capacity by placing buy/sell orders.
curl --request POST \
--url https://api.sfcompute.com/v2/procurements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"target": "node_count",
"capacity": "<string>",
"min_sell_price_dollars_per_node_hour": "<string>",
"max_buy_price_dollars_per_node_hour": "<string>",
"managed_window_minutes": 750,
"name": "my-resource-name",
"enabled": true
}
'{
"id": "<string>",
"resource_path": "<string>",
"owner": "<string>",
"workspace": "<string>",
"name": "<string>",
"object": "procurement",
"target": "node_count",
"capacity": "cap_k3R-nX9vLm7Qp2Yw5Jd8F",
"min_sell_price_dollars_per_node_hour": "<string>",
"max_buy_price_dollars_per_node_hour": "<string>",
"managed_window_minutes": 750,
"enabled": true,
"status": {
"state": "info",
"message": "<string>"
},
"created_at": 1738972800,
"updated_at": 1738972800
}Create an API token using sf tokens create or at https://sfcompute.com/account/api-keys.
"node_count"Minimum price to sell compute for ($/node-hour). Must contain decimal point. Will be rounded to nearest multiple of $0.000060.
^\d+\.\d+$"2.500000"
Maximum price to buy compute ($/node-hour). Must contain decimal point. Will be rounded to nearest multiple of $0.000060.
^\d+\.\d+$"2.500000"
How far ahead (in minutes) the procurement buys and sells compute. Higher values secure compute further in advance but commit to longer windows that may need to be sold when scaling down, potentially at a loss. Lower values reduce waste but risk compute being unavailable. Orders are placed in 1-hour blocks, so the furthest hour is secured up to managed_window_minutes - 60 minutes before it begins.
60 <= x <= 14401 - 255[a-zA-Z0-9][a-zA-Z0-9._-]{0,254}"my-resource-name"
Enable/disable the procurement.
Procurement created.
proc_[0-9a-zA-Z_-]{1,21}"proc_k3R-nX9vLm7Qp2Yw5Jd8F"
A resource path for a procurement resource. Format: sfc:procurement:
sfc:procurement:([a-zA-Z0-9._-]+:){2}[a-zA-Z0-9._-]+"sfc:procurement:<account_id>:<workspace>:<name>"
1 - 255[a-zA-Z0-9][a-zA-Z0-9._-]{0,254}"my-resource-name"
1 - 255[a-zA-Z0-9][a-zA-Z0-9._-]{0,254}"my-resource-name"
1 - 255[a-zA-Z0-9][a-zA-Z0-9._-]{0,254}"my-resource-name"
"procurement""node_count"ID (default) or expanded summary when using expand parameter
cap_[0-9a-zA-Z_-]{1,21}"cap_k3R-nX9vLm7Qp2Yw5Jd8F"
Minimum price to sell compute for ($/node-hour). Must contain decimal point. Will be rounded to nearest multiple of $0.000060.
^\d+\.\d+$"2.500000"
Maximum price to buy compute ($/node-hour). Must contain decimal point. Will be rounded to nearest multiple of $0.000060.
^\d+\.\d+$"2.500000"
How far ahead (in minutes) the procurement buys and sells compute. Higher values secure compute further in advance but commit to longer windows that may need to be sold when scaling down, potentially at a loss. Lower values reduce waste but risk compute being unavailable. Orders are placed in 1-hour blocks, so the furthest hour is secured up to managed_window_minutes - 60 minutes before it begins.
60 <= x <= 1440Enable/disable the procurement. Disabling cancels all standing orders.
Show child attributes
Unix timestamp.
1738972800
Unix timestamp.
1738972800