We are building a Bitcoin Exchange. So is it allowed to execute the order of the same user, that is to execute the buy limit order of the user1 with sell limit order of the user1 if the price matches. What is approach that all financial exchanges usually follow, they execute them or leave it.
Waiting for your suggestions and solutions.
Thanks,
You shouldnt automatically make the trade. Let the user know that he can buy from himself, but dont do it unless the user says so.