The nutrition of fishes isn't that alien. After all, fishes are our own stay-at-home mainline vertebrate cousins.
Fish metabolism. As you know, fishes are poikilothermic; their metabolism varies with the water temperature. At lower temperatures, metabolism slows and less food is required.
Our picture of nutrition requirements for our tropical fishes is skewed because most of the experimental work done on fish metabolism has involved salmonids being reared for human food. Comparisons of the actual caloric energy that fish realize from metabolism to the theoretical possible maximum suggests that the efficiency of fish metabolism lies slightly under 50%. The rest is lost, mostly as muscle heat dissipated in the water. Factors that influence the nutrient requirements of fish include low energy requirements, which are strongly affected by temperature.
Digestion. The main digestive enzyme of carnivorous fishes, which they have in common with us, is pepsin, combined in the stomach with the hydrochloric acid that produces the low pH that's required to keep the enzyme active. Piscivorous fishes, the ones whose main diet is other, smaller fishes, have the shortest intestines. Carnivores that specialize in small insects, crustaceans and larvae have longer intestines, to process a diet that includes a lot of indigestible chitin. When D. L. Kramer and M. J. Bryant measured gut lengths of 21 freshwater species from forest streams in Panama (1995), they reported guts that ranged from one standard length in carnivores to over 5 and more than 28 body lengths in herbivorous fishes.
Not all fishes have a stomach, though: many herbivores and some detritivores lack a stomach, along with its acid and pepsin. They have instead much the longest coiled intestine, in which hard-to-process vegetable matter and detritus is digested. Proteins are also broken down in the intestine's less acidic environment with trypsin, another enzyme that most vertrebrates share. Omnivorous species also have high levels of amylases in the intestine, to break down starches, which are the least digestible form of carbohydrate. All these freed nutrients are absorbed across the intestinal wall, much as with mammals.
Proteins, lipids and carbohydrates are the three main categories of a fish diet. In natural conditions, fish diet is largely protein and lipids (fats and oils), derived from plants as well as animals, often at second-hand when the fish consumes the grazer. Growing fry require more protein than adult fish. And small fish require more protein than large fish. Though fishes require lipids, there is little carbohydrate in a natural fish diet.
Protein. Protein is used mainly for growth (anabolism) rather than for energy to run metabolic processes (catabolism). Fishes continue growing, at reduced rates, throughout their lives, though after sexual maturity they may increase more in girth than in length. In native habitats, active fishes may feed in times of plenty largely on invertebrates, including insects, providing levels of protein far in excess of requirements; they also starve at other seasons, when prey is unavailable. Adult carnivorous fishes require 40 to 55% dietary protein, while omnivores need only 35 to 45%. As fishes mature, they utilize less of their available dietary protein. And at all stages of their lives, high-intensity feeding leads to less efficient protein conversion. In other words, though excess protein goes in, it can't be assimilated and passes right through.
Lipids (fats and oils) are fully digestible, rendering CO2 and water as end products of metabolism. Proteins render CO2 and water too, and also some nitrogenous waste, which frehwater fish excrete mostly as ammonia, constantly diffused into the water over the surfaces of the gills. (Marine fishes, in a very different osmotic environment, depend largely on urea instead.) Growing fish process lipids to provide energy, saving the proteins in their diet for building tissue. Mature fish aren't geared to deal with much fat and lipids anyway. Surplus fats that can't be burned provide essential fatty acids, some of which get stored as triglycerides, some of them in the fishes' liver. In fasting times triglycerides can be mobilized for metabolism and maintenance. With too many lipids constantly in the diet, over time eventually the liver tends to enlarge, finally badly enough to make the fish look bloated. Liver disfunction results in retained water, a condition we still might be calling "dropsy" or attributing to constipation.
Carbohydrates all come from plants, directly or indirectly. Of the three classes of nutrients, carbohydrates are the least essential, but the cheapest to obtain. Any cereals and cereal by-products in flake feeds are essentially fillers — the cheapest ingredients in processed feeds, a thought that won't be far from mind when you scan the ingredients on the packaging.
The various celluloses are forms of carbohydrate that can't be digested by any vertebrate. A wide range of detritivores, omnivores and herbivores maintain an intestinal flora of fungi that break down cellulose. Constant microbial fermentation in the hind gut produces volatile fatty acids, which are absorbed and immediately put to use.
Amino acids. Fish break down dietary protein and lipids into the amino acids of which they are composed, then recombine them to synthesize the fishes' own characteristic proteins. Like the rest of the vertebrates, fishes can't manufacture all ten amino acids they require: they have to collect them here and there in their diet. Yet all the amino acids must be present for protein synthesis; lack of any one becomes a "limiting factor" that puts a cap on the usefulness of all the others. This is the fundamental reason for varying your fishes' diet.
Vitamins are absorbed from the fishes' intestine. Water-soluble vitamins are constantly excreted, but fat-soluble vitamins may be stored, and excesses can cause trouble. Experiments in 2006 to detect any difference — in pigmentation or survival, growth or antioxidant capacity — of dietary beta-carotene or astaxanthin on the already rosy Hyphessobrycon callistus, one of the "Serpa Tetras", could find none; then experiments in 2008 on the "Flame Gourami" variety of Colisa lalia, did find an effect, both directly observed and in the reaction of females. You could say the results are still out.
Phosphate. Two-thirds of the phosphate found in plants and half the animal phosphate passes right through a fishes' system to fuel the phosphate cycle in your aquarium. The phosphate in flake feed comes largely from the fish meal content, which includes the phosphatic apatite derived from ground-up fish bones.
Calcium. Ordinarily fish get all the calcium they need in their carnivorous diets, but when they were experimentally deprived of calcium, channel catfish proved efficient at absorbing it across their gills, even from water that was as low in calcium as 5ppm.
Beef liver and heart. Fishkeepers often feed some lightly boiled liver or beef heart, carefully freed of its fatty surrounding tissues, to larger, carnivorous fish. Beef heart provides concentrated protein to maximize the growth of fry, so discus breeders use it. But for the average adult fish in captivity, there's too much protein in heart and liver to make them a steady diet.
There's a risk involved here, though healthy mammal liver tissue and heart muscle don't have fat in them. Mammal and bird fats tend to be unsaturated fats. In the warm-blooded creature they remain soft, but at cool fish temperatures they harden and go waxy. So, though you may feed some beef heart or liver, muscle meat from any bird or mammal is not recommended as fish food. The essential unsaturated fatty acids that must be supplied in the fishes' diet, are not the same series that warm-blooded creatures require. "Wild Discovery" photographers might throw the carcass of a capybara to the piranhas, but the piranhas' more usual prey are other fish. And, surprisingly, often fruit and seeds.
Varying goals in feeding fishes. When you read about fish nutrition in the documents linked below, keep in mind a basic difference in focus. Fish nutritionists are essentially writing for aquaculturists, who are trying to maximize rapid weight gain for food fish. Though in these cases nutritionists will recommend carbohydrates as a cheap source of energy, they won't be recommending those carbohydrates that aren't easily digestible by fish, which include cellulose and hemicellulose, gums and pectins, all forms of dietary fiber. Your objectives are somewhat different: you are feeding to maintain fish that remain lean and active into a ripe old age.
Links. "Fish nutrition: choosing a basic freshwater fish diet" at Drs Foster & Smith Pet Education, D.F. Bobo, "The basics of fish nutrition" at Age of Aquariums and Pablo Tepoot, "Basic fish nutrition" at Wet Web Media all give you sound basics.
Adrian Tappin's introduction to feeding rainbowfishes applies to all the omnivores.
Don Johnson's brief 2001 hobbyist-oriented article "Fish nutrition" is archived at FishGeeks.
The FAO document "Fish feed technology" is a U.N. handbook covering every aspect of nutrition and digestion in teleost fishes, slanted towards aquaculture of food fishes. If you have a geeky streak, you'll enjoy it.
In print, your best introduction to fish nutrition will be chapter 7 in "Moyle and Cech", i.e. Peter B. Moyle and Joseph J. Cech Jr., Fishes: an Introduction to Ichthyology (5th ed., 2004).