These are known as 'immediate or cancel' (IOC) or 'fill and kill' (FAK) orders. Some orders expire immediately after matching against what is available on the order book. The order will remain there until the trader cancels it, or it expires (e.g. What happens if an order is submitted to the market, but it does not match? It is entered into a list of orders called the order book. This process is also known as a match, because the buy and sell prices must match or cross over for a trade to occur. When a sell order's price is equal to or lower than the highest priced buy order currently available, a trade occurs. When a buy order's price is equal to or higher than the lowest priced sell order currently available, a trade occurs. Sell orders are also referred to as ask or offer orders. Buy orders are also referred to as bid orders. People come together and then announce their desire to buy or sell a specific stock I want to buy 500 shares in BHP for $35.00, I want to sell 2,000 shares in RIO for $65.34. How do buyers and sellers meet? They use a centralised market place called a stock market. Orders & TradesĪ trade occurs when a seller agrees to transfer ownership of a specified quantity of stock to a buyer at a specified price. It is framed in terms of the equities (stock) market, but generally applies to most trading markets (e.g. The following section explains the basic terms and concepts related to trading and market data structures. securities, trade histories) that can be used for higher level processes such as algorithmic trading.
It discusses trading concepts, the different types of market data available, and provides a practical example on how to process data feed events into a market object model. The goal of this article is to introduce the concepts, terminology and code structures required to develop applications that utilise real-time stock market data (e.g. 2Īdded explicit instructions for swapping the 'SparkAPI' project over to use the 32-bit version of the native spark.dll file.
While there is a sample market data file included in the source code package, I've made additional market and security event data files availabled for download at for those who wish to experiment further.