Goldfish belong to a special category of aquarium fish. Most common aquarium fish, freshwater and marine, come from the tropics. Goldfish originate in subtropical and temperate climates. As such, goldfish have somewhat different nutritional requirements from most pet fish.
General Fish Nutrition
All fish have the same basic nutritional needs. However, the proportion of macro- and micronutrients and the foods they eat to obtain them vary by species. All fish need protein for building their bodies. All fish also use fat for energy -- unlike mammals and other vertebrates that use fat and carbohydrates like sugar. Carbohydrates are almost nonexistent in most fishes' diets. Fish also need trace amounts of vitamins and minerals for specific biological processes.
One difference between goldfish and tropical fish is that goldfish's diets change as they age. Specifically, the portion of protein in their diet should go down as they get older. Fish less than 1 year of age need to have a diet consisting of 40 to 45 percent protein to thrive. From 1 year to 3, goldfish need about 35 to 40 percent protein. Goldfish over 3 years old need about 25 to 30 percent of their diet to consist of protein sources. This contrasts with tropical fish, which typically need the same proportion of protein throughout their lives. Additionally, goldfish need a higher proportion of fat in their diet compared to tropical fish.
Staple Foods and Constipation
You usually do not need to worry about the specifics of percentages and ingredients. Most pet shops sell fish flakes or pellets branded as either goldfish flakes or tropical fish flakes. Manufacturers formulate these foods based on fishes' nutritional needs. You can use these dry foods as a "staple" or main food for your fish. Keep in mind that goldfish tend to get constipated if you only feed them dry foods like flake and pellets. You can prevent this by mixing in plant and animal foods as the occasional treat. Also, having a "fasting day," or a day when you don't feed your fish, benefits most aquarium fish, including goldfish. You may also want to soak pellet foods in a dish of aquarium water for about a minute before feeding them to goldfish to further discourage constipation.
Both goldfish and tropical fish like treats consisting of unprocessed plant and animal foods. These foods more closely mimic their diet in the wild. With tropical fish, you need to base this on their food preferences. However, goldfish are enthusiastic omnivores and will relish many foods. You can feed goldfish -- and vegetarian tropical fish -- certain aquarium plants like duckweed and anacharis. Vegetarian fish and goldfish also like certain grocery-store veggies, like parboiled peas and spinach. As omnivores, goldfish also like meaty foods like live and frozen bloodworms, brine shrimp and Daphnia, as do tropical carnivores. At the same time, some grocery store seafood like fish and crustaceans are rich in caratenoids, nutrients that enhance goldfish's colors.