Skip to content

Replace the cost with a new one

PUT
/v0/costs/{cost_id}

Authorizations

Parameters

Path Parameters

cost_id
required

A UUID newtype

string format: uuid

Unique identifier of the cost

Query Parameters

group

Controls whether cost group details should be included in API responses

Since cost groups can be large, this enum allows API endpoints to optionally exclude group details from responses to reduce payload size.

string
Allowed values: exclude include

Request Body required

One of:
object
data
required
One of:
One of:

A representation of a piecewise-linear, weakly monotone decreasing demand curve

Demand curves define a bidder’s willingness to pay for different quantities of a good. In flow trading, these curves must be:

  • Piecewise-linear (defined by a sequence of points)
  • Weakly monotone decreasing (price non-increasing as rate increases)
  • Include the point rate=0 in their domain (must allow zero trade)
Array<object>

A representation of a point for use in defining piecewise-linear curves

Each point consists of:

  • A rate (quantity per time unit)
  • A price (value per unit)

Points are used to define the vertices of piecewise-linear demand curves.

object
price
required

The price (value per unit) coordinate

number format: double
rate
required

The rate (quantity per time) coordinate

number format: double
group
required

A hashmap with deterministic ordering

object
key
additional properties
number format: double

Responses

200

A full description of a cost

A CostRecord combines all the information needed to define a cost:

  • Who owns it (bidder_id)
  • Which auths it applies to (group)
  • The utility function (data)
object
bidder_id
required

The responsible bidder’s id

string format: uuid
cost_id
required

A unique id for the cost

string format: uuid
data
One of:
null
group

The group associated to the cost. Because it is not always required, some endpoints may omit its definition.

object | null
version
required

The “last-modified-or-created” time as recorded by the system

string format: date-time

400

401

403

404

409

415

422

500