Building a crypto currency exchange require a huge responsible but if you know the story everything it will require it will be easy for you and you need to be careful in choosing who you work with. However, early in the crypto currency stage there are some open source code which people used then I mean
Peatio,
RubyKube,
3s3s etc. You can googling the name for more information.
I thought about open source but i worry about security. I think Peatio look like good but to developt it i need a team with more work php,html,css,js,linux,sql,dos,C ... so on