Why did my limit order get executed immediately?
It may be that your limit order was placed at a price better than the prevailing best bid or offer.
A limit order is an order to buy or sell at a specific limit price or better. The limit price is determined by you. The trade will only be executed if the market price reaches your limit price (or better). Therefore, you may use limit orders to buy at a lower price or to sell at a higher price than the current market price.
Unlike market orders, where trades are executed immediately at the current best available price, limit orders can be placed on the order book and are not necessarily executed immediately unless placed at a price better than the prevailing best bid or offer.
Generally speaking, a limit order will take longer to fill than a market order. This depends on market volatility and how quickly the limit price is reached. In volatile market conditions, if the limit price is close to the prevailing market price, a limit order may execute almost immediately, as the market shifts.