If quantity is zero, any pending buy order for the indicated item will be canceled. Only one pending buy order may be active for each item at a time. If two buy orders are issued for the same item, and the first has not yet completed, the second buy 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. 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.