Create a pricing policy
const url = 'https://api.flotera.com/api/v1/strategy/policies';const options = { method: 'POST', headers: { cookie: '__Host-erm_session=<__Host-erm_session>', 'Content-Type': 'application/json' }, body: '{"name":"example","preset":"max_profit","gpu_model":"example","marketplace":"vast","pause_below_reliability":1,"never_raise_when_rented":true,"offset_fraction":"12.340000","max_usd_per_gpu_hour":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.flotera.com/api/v1/strategy/policies \ --header 'Content-Type: application/json' \ --cookie __Host-erm_session=<__Host-erm_session> \ --data '{ "name": "example", "preset": "max_profit", "gpu_model": "example", "marketplace": "vast", "pause_below_reliability": 1, "never_raise_when_rented": true, "offset_fraction": "12.340000", "max_usd_per_gpu_hour": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Idempotency key, 1–128 ASCII, unique per (tenant_id, operation, key) for at least 24 hours. Retrying with the same body replays the stored response; a different body returns 409 idempotency_conflict.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Which point of the market the policy aims at. mining_first and long_rentals_only are kept in the vocabulary but cannot be computed from market data alone — see computable on the policy. Dropping them would be cleaner code and worse product: someone who picked “Mining First” should learn what is missing, not find the option gone.
Card class the rule governs. One rule per card class and marketplace: two rules over the same cards would produce two prices, and which one wins would depend on the sweep order.
Supported marketplace. The database constrains the same two values, so a third one is a migration rather than a new string.
Reliability floor below which the rule stays silent. Omitted keeps the previous value when editing, and on creation takes the default of THIS marketplace — 0.900 on Vast, none on Clore. null turns the gate off.
Defaults to true. Raising the price of a machine with a running rental ends its extension at the current term.
Offset from the market anchor as a FRACTION: 0.10 is ten percent above. A fraction here and a percent elsewhere is an error by exactly one hundred, and it shows up as a price on a marketplace.
Price ceiling. Not about greed — it catches 10 typed where 0.10 was meant, which would otherwise reach the marketplace.
Responses
Section titled “Responses”Created.
object
UUID (v7 for new entities; v4 accepted during migration).
Which point of the market the policy aims at. mining_first and long_rentals_only are kept in the vocabulary but cannot be computed from market data alone — see computable on the policy. Dropping them would be cleaner code and worse product: someone who picked “Mining First” should learn what is missing, not find the option gone.
The card class this rule governs, as the market rows key it (rtx 3060). Price is set per card class, not per machine: two 3060s in one rack are worth the same, a 4090 is not.
Supported marketplace. The database constrains the same two values, so a third one is a migration rather than a new string.
Decimal value serialized as a string, never a JSON number.
Decimal string or null when unknown.
Stay silent while the marketplace reliability of a machine is below this fraction. On Vast, under the platform threshold the machine is not shown to renters at all, so no price sells it — a suggestion there would optimise the price of goods absent from the shelf. Clore publishes no such threshold and a freshly joined machine reads near zero, so a new Clore rule starts with no floor. null disables the gate; that is a choice, not missing data.
Never propose a price above the current one while a rental is running. Rental terms freeze at the moment of rent and extension is possible only while the offer is not dearer than the contract, so a raise quietly ends the extension: the renter finishes the term and leaves.
How many machines the scope currently covers.
Whether this preset can be computed from market data today. False means the engine will produce nothing for it and says so, rather than silently suggesting nothing — silence reads as “all good”.
What the preset needs and the platform does not have.
RFC 3339 UTC with microsecond precision.
RFC 3339 UTC with microsecond precision.
Example
{ "preset": "max_profit", "marketplace": "vast", "offset_fraction": "12.340000", "created_at": "2026-07-25T10:15:30.123456Z", "updated_at": "2026-07-25T10:15:30.123456Z"}Missing/invalid credentials (code=unauthorized).
RFC 9457 problem document with a stable machine code.
object
Stable machine-readable error code (03 §2.4).
UUID (v7 for new entities; v4 accepted during migration).
object
JSON Pointer to the offending field.
Example
{ "type": "https://ermeon.com/problems/validation", "code": "unauthorized"}Authenticated but not permitted. code=forbidden — role/scope mismatch; code=feature_not_entitled — the plan does not include the capability; code=account_frozen — the account is frozen and this operation is declared x-ermeon-frozen: deny. The three are deliberately distinct: only the last one is fixed by a top-up (13 §5.6).
RFC 9457 problem document with a stable machine code.
object
Stable machine-readable error code (03 §2.4).
UUID (v7 for new entities; v4 accepted during migration).
object
JSON Pointer to the offending field.
Example
{ "type": "https://ermeon.com/problems/validation", "code": "unauthorized"}A policy with that name already exists.
RFC 9457 problem document with a stable machine code.
object
Stable machine-readable error code (03 §2.4).
UUID (v7 for new entities; v4 accepted during migration).
object
JSON Pointer to the offending field.
Example
{ "type": "https://ermeon.com/problems/validation", "code": "unauthorized"}Request failed validation (code=validation_failed), with per-field errors.
RFC 9457 problem document with a stable machine code.
object
Stable machine-readable error code (03 §2.4).
UUID (v7 for new entities; v4 accepted during migration).
object
JSON Pointer to the offending field.
Example
{ "type": "https://ermeon.com/problems/validation", "code": "unauthorized"}A dependency the endpoint needs is not configured or is temporarily unavailable (code=unavailable). The rest of the API keeps working — an absent external integration must not take the service down.
RFC 9457 problem document with a stable machine code.
object
Stable machine-readable error code (03 §2.4).
UUID (v7 for new entities; v4 accepted during migration).
object
JSON Pointer to the offending field.
Example
{ "type": "https://ermeon.com/problems/validation", "code": "unauthorized"}