If a buyer has a choice between two or more sellers, the one offering the lowest price will be chosen. If several sellers offer at the same price, the one nearest the top of the location's character listing will win the trade. A seller with a choice among two or more buyers will pick the highest unit as it appears in the location's character listing.
Since characters are added to the end of the list when they enter a location, the units who have been in a place the longest tend to appear toward the top of the list. Characters who have been in a place the longest have an advantage when one of several possible trades may be matched.
However, consumption or production by the city itself will always have lowest priority. Cities defer to characters when multiple matching trades are possible.
The location market report is ordered according to how multiple trades will resolve.
trade who price qty item ----- --- ----- --- ---- sell 3682 10 1 iron [79] sell 2019 12 1 iron [79]
A buyer would get 3682's iron, since the price is lower.
trade who price qty item ----- --- ----- --- ---- sell 2019 10 1 iron [79] sell 3682 10 1 iron [79]
A buyer would get 2019's iron. 2019 must appear before 3682 in the location character list.
trade who price qty item ----- --- ----- --- ---- buy 4846 10 1 iron [79] buy 1783 10 1 iron [79]
4846 would win the buy from a lone seller. 1783 must come after 4846 in the location character list.
trade who price qty item ----- --- ----- --- ---- buy 4846 10 1 iron [79] buy 1783 11 1 iron [79]
sell 79 1 10 will match 4846. sell 79 1 11 will match 1783.