Good water quality is the most important basic requirement of all that ensures that your goldfish stays healthy. Conduct regular water changes (preferably twice a week) and between that period, monitor and test using test kit on important water parameters like pH, temperature and hardness level to maintain a certain range, which they would tolerate. Goldfish being a cold water species prefers temperature of the water within 18 to 22 degree Celsius (although 20 degrees is the best temperature to have), pH around 7.5 while maintaining soft water at the range of 3.5 to 6.7 dGH.
Other than what is mentioned, the water must stay clean all the time and overall presence of a little bit of algae is actually good for your goldfish. An experienced goldfish breeder will also tell you that in order to maintain crystal clear water, having a powerful and effective water filtration system is a must because goldfish will generate a lot of waste and they will discharge poop almost immediately after feeding. Sometimes, it is good also to install a UV sterilizer to ensure that whatever undesirable harmful bacteria level can be decreased and this will probably lower the chances for your goldfish to become sick.
Good water quality can also be achieved by maintaining low stocking level. Basically goldfish requires a lot of space for their growth and stays healthy. Read more about getting the right tank size for your goldfish.
Food is another thing that you need to take care of because basically what you feed to them will determine their growth rate and body coloration. Always bear in mind that not all fish pellets which are sold in pet stores will be the right type for them and to sums it all, whatever that you intend to feed to them, must be monitored closely to determine whether it is first suitable for your goldfish. Usually if the food is the right one, the poop discharge will be solid and won’t easily disintegrate in the water while the color is also slightly darker.
Mixing different types of live aquarium food and pellets will also ensure that your goldfish gets the best nutrition. From time to time, you can also feed them peas in order to get rid of trapped air bubbles in their delicate stomach.
Frequency of feeding is also something you need to look into. A common mistake is to feed your goldfish too much food until they become bloated and it is always a good practice to reduce the same amount of food and spread it out evenly to two different course meals. In other words, it is better to provide small amount of food but more frequently rather than one large meal at a go.
Related goldfish care topics:
Winterizing Goldfish in Ponds
Caring for Japanese Jikin and Ranchu