There are many reasons why this could have happened... but I think there is one main reason...
it does not sound like you cycled you tank
When you first set up a tank you have to let it sit for some time(sometimes even a week) so that the nitrifying bacteria can get set up. Your fish should make waste... turns into ammonia (which kills fish) then you need those bacteria to turn that into nitrate which is ok for the fish.
You should have a water testing kit (either strips or chemicals) so do the tests on ammonia and ph and all that stuff and see if there is anything wrong... Im not familiar w/ cloud fish so I dont know what ph they need but most fish are fine w/ 7.0 ph.
This is only considering that you have filter, heater, correctly fed, and dechlorinated water.