Order execution platform

Hi

I thought a good programming exercise might be designing an order execution platform for stocks. E.g. matching buy order and sell orders

Does anyone have any thoughts about this? Would I need a database to represent orders or could I just use an object to represent an order?

Thanks
Would I need a database to represent orders or could I just use an object to represent an order?
That depends. Do you care if the data is reset after the program stops?
no, i suppose not

thinking about it, i'm not even that sure how the orders are matched. i guess there are certain rules, like:

1. all stock in a single order must be bought be sold/bought for the same price
2. an order cannot be executed unless each stock in the order is sold/bought
3. there are different types of order - limit (sell/buy only once a min/max is reached) and market (sell/buy for whatever is best price)
4. stocks can be sold to/bought from multiple buyers/sellers in order to execute an order
5. if multiple identical orders, then execute first order first (but what about when non-identical and later order can be matched but first order cannot as different number of stock in the order?)

lots of interesting concepts here but couldn't find much online


Last edited on
Topic archived. No new replies allowed.