Learn · Orders and fills
The Order book and matching
How bids and asks become executions, and why one order can produce several trades.
Last updated: 2026-09-20
Prices waiting for a counterparty
The Order book is a list of unfilled buying and selling interest in a company. The best Bid is the highest price currently offered by buyers. The best Ask is the lowest price currently requested by sellers. Below those first levels, bids step down and asks step up. Each displayed quantity combines the shares waiting at that price, rather than identifying one specific participant or one specific order.
The difference between the best Bid and Ask is the spread. If the Bid is 10.00 CC and the Ask is 10.03 CC, the spread is 0.03 CC. The latest traded price may be different from both because it records a completed transaction, while the book describes orders waiting now. A quote can disappear through a cancellation as well as through a fill. Every change in the book is not necessarily a trade.
Price first, then time
MockTradeCity matches eligible orders by price priority, followed by time priority. Higher bids come before lower bids, and lower asks come before higher asks. Within the same price level, an earlier order comes before a later one. An incoming order therefore cannot choose to skip a better eligible price simply because another price appears more convenient. The visible levels are the result of many individual orders arranged under these rules.
An account cannot trade with itself. Matching skips its own opposite-side orders instead of creating artificial volume. Players, virtual investors and market makers follow this restriction alike. Execution-session eligibility, expiry and price protections also matter when deciding which orders can match. The quantity visible at a level is useful context, but the execution still depends on the eligible orders remaining when the engine processes the incoming request.
The resting order supplies the price
A resting order is already waiting in the book. An incoming order becomes the active side when it reaches an eligible resting order's price. The execution uses the resting order's price. If your purchase has a limit of 10.05 CC and an eligible seller is waiting at 10.00 CC, those shares trade at 10.00 CC. Your limit is the maximum permitted price for that purchase, not an instruction to pay exactly that amount.
Imagine 300 shares offered at 10.00 CC and another 200 at 10.02 CC. A purchase of 500 shares limited to 10.05 CC can produce two executions: 300 at the first price and 200 at the second. Total consideration is 5,004 CC, with an average execution price of 10.008 CC before display rounding. The final execution is at 10.02 CC. The average price of your order and the market's latest price describe different things.
A fill changes more than the chart
An execution transfers CC and shares through the city's accounting system. Reservations support settlement so the same resources cannot be spent twice. Any excess reserved for a better-priced execution is released under the normal rules. The completed trade contributes to volume and turnover, appears in the trade list and can update the latest price. Merely placing a very high bid or very low ask cannot rewrite trade history without an eligible execution.
If the full quantity cannot match, the remainder depends on the order's time in force. A permitted Day or Good till canceled (GTC) Limit order can rest at its limit. An Immediate-or-cancel (IOC) remainder is canceled instead. A partially filled order is therefore perfectly possible: some shares have settled while others are still waiting or have been canceled. Canceling the remainder never reverses the executions that already occurred in the market.
Where to follow matching in the city
A company page puts the Order book beside recent trades. The first shows outstanding intentions; the second records completed matches with a time, price and quantity. Selecting a displayed level can fill that price into the order ticket, but the book can change before submission. Neither the displayed quantity nor the selected price reserves a counterparty for you. The accepted order and its executions establish what actually happened.
Account connects those public trades to your own order history. The filled quantity, remaining quantity and resulting Positions explain how one request was processed. A chart compresses the trade history into points or candles, so it hides details that remain visible in individual executions. Reading the book, trade list and order record together makes it possible to distinguish a waiting limit, several fills at different prices and a canceled remainder, all using fictional City Coin.