The minimum size tank for any goldfish is 4 foot long. This size tank is big enough to keep the goldfish until it is an adult. If you have 1 small fantail goldfish, it can live in a 2 foot tank for a while but will eventually need a bigger home.
Tanks that are long and wide are better for all fish because they have more swimming room (left and right). Fish only swim up and down to get food from the surface, and surface area (length x width) is much more important than height.
A nice sized tank for fancy/ fantail goldfish is 4 foot long x 18 inches wide x 18 inches high. If the tank is wider or longer, that is even better.
Single tailed goldfish grow bigger than fantail (2 tails) goldfish and a tank that is 6 foot long x 2 foot wide x 18 inches high is suitable. A 6ft x 2ft x 2ft is even better.
------------------------
Goldfish are coldwater fish but can also live in warm water. They will survive temperatures down to just above freezing, and up to 30C or more. This does not mean they can go from 5C to 30C instantly, but they can survive in those conditions if the temperature changes slowly over a period of months, like in the wild when a river cools in winter and eventually freezes over.
Single tailed goldfish tolerate cold conditions better than fancy fantail goldfish. I prefer to keep the fancy fantail goldfish at temperatures between 15-25C. Single tailed goldfish also do well in these temperatures.
Fish kept in cooler water should be fed less often because they take longer to digest the food.
If you want to breed goldfish, you keep them in cold water for a couple of months and then slowly raise the temperature. When the water temperature gets to 18C or above, the fish will start breeding.
------------------------
Goldfish need plant matter in their diet. Duckweed is a small floating plant that is readily eaten. They will also eat any soft leaf aquarium plants.