sell

Olympia: The Age of Gods PBEM (Oct 4 2000)

## `sell`

      sell item qty price [have-left]
      * time: 0 days
      * priority: 1

Sell quantity of the given item for max-price each.

If quantity is zero, any pending `sell` order for the indicated item will be canceled.

Only one pending `sell` order may be active for each item at a time. If two `sell` orders are issued for the same item, and the first has not yet completed, the second `sell` order will replace the first.

Buys and sells are only matched in cities, where markets may be found to execute trades. However, `buy` and `sell` may be issued anywhere.

Trades only occur at the end of the day. Therefore, you must stay in a location for at least one day to execute a trade. If you step into a market, issue a `buy` or `sell`, and then leave immediately, no trade will occur. To be certain to stay at least one day, you may issue a wait command.

Example:

      > sell 79 3 5
      Try to sell three iron [79] for 5 gold each.

If there is a buyer of iron in the city, buying for 5 gold or more, the trade will be executed:

      1: Sold three iron [79] for 5 gold.

Otherwise, the sell will be placed on the noble's pending trades list:

      Pending trades:

      trade    price    qty   item
      -----    -----    ---   ----
       sell        5      3   iron [79]

At the end of the turn, the sell order will appear in the city's market report:

      Market report:

      trade    who    price    qty   item
      -----    ---    -----    ---   ----
       sell   2019        5      3   iron [79]

A trade will match between a buyer and a seller if the buyer's price is greater than or equal to the seller's price. The actual price that the trade will be made at is the seller's price.

Have-left is an amount of the item that noble will keep and not sell. For instance, if the unit issued ```sell` 79 10 15 5`', this would mean "Sell ten iron for 15 gold each, but keep 5 iron for myself." If there noble only have ten iron, this order would put five up them up for sale.