Matching process has various models. FIFO, by size at the best price, by best size at the best price... Depends of instrument + session.
Most of exchanges provide it while direct connection. Not sure they have it in public access. BTW, some of brokers (like Interactive Brokers) has they own internal matching engine. Especially for short sell stock orders. A broker can fill it independently.
Whistleblowing looks like the new gold rush... Less risk, good reward and the possibility to be a nuisance to your ex-colleagues( especially those who were better than you ). No real downside...LOL
Most exchanges work with Price/Time priority. Where price means that Bids and higher prices and Offers at lower prices get filled first. Then within each price level, the oldest order gets the first fill. But there are some that operate on pro-rata or Price/Size priority. In this case, within each price level when a block of shares comes to execute it is broken up into pieces and each order in the queue gets a piece, depending on the size of the order in the queue. So if there are orders for 5000, 3000, 2000 and the market order is for 1000 shares... it gets split up into 500, 300, 200 respectively. If we have several exchanges competing for that market order, then each exchange has it's own internal priority/line... but the trader sending that market order can choose which way to send it; there is no priority rule between exchanges, aside from price priority, only inside each exchange. If the market order is larger than the queue at one exchange then it has to route away, how this is done is different from market to market depending on regulations, agreements between exchanges and routing instructions submitted into the market order.