What are the water parameters?
Are they tested with test strips or liquid test?
Ammonia
Nitrite
Nitrate
Temperature
pH
TDS
GH/KH
How long has this tank been set up and are you familiar with the nitrification cycle, check the article in my signature link for some good tips and information.
What is your tank size,
filtration,
and water change schedule how much
how often?
Is there a decent amount of air for him.
Usually there is a water problem if hanging out at the top, which could have been something that happened 4-8 weeks prior too, which could have had a NitrIte issue and damaged internal organs.
Do you see any external parasites? Gills, mouth anal vent, any tiny black or white specks, wiggly wormy things, string like things???
What size is the fish
how long have you had it?
Are there any other fish in the same tank?
What are you feeding him?
These are generally wild caught, and could also have internal parasites, is the belly hollowed in at all?
What does the poop look like?