Maroof Street
A stock exchange I built from scratch: a C++ matching engine, Kafka, Postgres and Redis. Five bots trade on it while it is open. Place your own order and watch it match.
Simulated market. Prices are made-up reference values, not real quotes.
Trades per minute
—
last trade —
Trades this session
—
since the exchange opened
Shares traded
—
across all five stocks
Shares waiting
—
resting in order books
Order book · AAPL
Orders waiting for a match. Green are buyers, red are sellers. Click a price to use it.
Buyers
price · shares wanted
—
Sellers
price · shares offered
—
Place an order · AAPL
Buys or sells right now at the best price in the book (— a share). In this demo every order completes: if nobody else is offering that price, a house account takes the other side.
Your demo wallet
Everyone starts with $100,000 of pretend money. This wallet is only yours, and it changes when your orders fill.
Your trades
Place an order and it appears here. Every trade you make stays in this list.
How a trade works
Place an order and watch it travel out through the exchange and come back to you. Click any box to see what it does.
Place an order to light this up
Live activity
Every trade as it happens. Hover to pause.
Who is trading
Six traders, written in four languages, all talking to the same exchange over the same gRPC API.
Posts a buy price and a sell price around the middle of the market every 5 seconds, so there is always someone to trade with.
Waiting for the market to open
Fires an aggressive order at a random stock every few seconds. This is what creates most of the trades.
Waiting for the market to open
Follows the crowd. If 4 of the last 5 trades were buys it buys, if 4 were sells it sells.
Waiting for the market to open
Bets against the crowd. Sells when the price runs above its recent average, buys when it drops below.
Waiting for the market to open
Slices a big order into 10 pieces, 10 seconds apart, the way an institution hides its size.
Waiting for the market to open
Anyone on this page. Each visitor has their own wallet, and all orders trade against the same market.
Waiting for the market to open