Skip to content

Create a new cost

POST
/v0/costs

Authorizations

Request Body required

object
cost_id
One of:
null
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
object
key
additional properties
number format: double

Responses

201

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

415

422

500