HandToHuman CLI reference All commands
DocsCLImarketmarket offer-edit

Public command

market offer-edit

Change an offer's title, unit price, units still available or metadata; orders already placed keep their total.

Exact invocation
handtohuman market offer-edit <ID> [--title <TITLE>] [--unit-price-cents <CENTS>] [--units <COUNT>] [--metadata <FILE>]
01

Inputs and options

<ID>

Required offer id.

--title <TITLE>

A new non-empty offer title.

--unit-price-cents <CENTS>

A new positive per-unit price, in the offer's own currency.

--units <COUNT>

The offer's available-unit count from now on; it may not be negative.

--metadata <FILE>

A file containing the valid JSON metadata that replaces the offer's metadata whole.

At least one of the four options is required. Each option given replaces that field; a field not given keeps its value.

02

Output and state effect

Result

Writes the named fields and prints the offer as JSON. Orders already placed against the offer keep the total they were created with. The kind, seller and currency cannot be changed, because orders and payouts were written in them; market offer-withdraw stops new orders instead.

Serialization

Successful output is pretty-printed JSON. Commands with --output <FILE> write it there instead of stdout; marketplace leaves always print to stdout.

Refusals

  • Refuses a call that changes nothing: offer-edit needs at least one of --title, --unit-price-cents, --units, --metadata.
  • Refuses an id that does not identify an existing offer: offer not found: <ID>.
  • Refuses an empty title (title is required), a price that is not positive (unit price must be positive) and a negative unit count (available units cannot be negative; `offer-withdraw <ID>` stops new orders).
  • Refuses metadata that cannot be read, and metadata that is not valid JSON with parsing JSON from <FILE> and the parser's cause.