most fish that i have seen doing this are doing so because of lack of oxygen in the tank.
Its Dead. When it floats up and the gills are not moving and breathing for sure it is dead
First, leave the bag with the fish in it floating at the top of the tank. Leave it there for thirty minutes for the goldfish to get used to the water temperature, then you can put it in the tank.
Fish do not normally "float around" they swim. If your fish is floating/sinking then it is probably dead.
If your fish don't eat it in a matter of 1 hour remove it from the tank.
If it is floating at the top of the tank/pond, it's eaten too much
If it's floating on it's back up at the top of the tank, it's dead. or if it's stuck in or under something it will most likely die.
The swim bladder makes your fish sink so it isn't floating to the top of the tank.If your fish is floating then it might be a swim bladder problem.Or your fish is dying.
The fish is either too full, or ill
the cause might be a sick fish, a dirty tank, or over feeding.
This may mean that you are over feeding your fish and they cannot finish what you have put in the tank; reduce the amount of food you give each feeding, and make sure you clean the tank regularly
its possible but i have a crayfish who his food is floating he gets it but no they can not get out cause they are use to the water