Every exchange has high level of security features. It is us who enable those security features and make sure everything is perfectly without any problem. Even after this there are chances of security breach, but those are quite common these days. For this better is to prefer decentralized exchanges. If not, better is to keep funds secure on a hardware wallet and move to the trading wallet only when required.