Order books are used to record and settle buy and sell orders placed by users in a traditional financial market. On decentralized exchanges, DEXs, operating an order book orders are placed into a smart contract at either a specific price or “market price” i.e. the current price. Market price orders are executed immediately against existing trades but orders placed at a specific price are locked into the smart contract and wait for orders to come along to fill them. This often means waiting for the price of the asset to move to the price they stipulated for their order. During this time the user’s assets are locked in the smart contract and are not available to the user.
Users are often given the ability to put “limits” on their orders, which is a time limit that automatically cancels the order if it is not fulfilled in the stated amount of time. This returns the locked assets to the user unchanged. Users are also given the ability to cancel these trade at any time, which, again, returns the assets to the user unchanged.