Order execution platform

Oct 5, 2018 at 9:51pm
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
Oct 5, 2018 at 9:55pm
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?
Oct 5, 2018 at 10:10pm
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 Oct 5, 2018 at 10:12pm
Topic archived. No new replies allowed.