In most cases, goldfish kept in aquariums should not have tankmates. There are a few reasons for this.
1. Because of their physiology, goldfish pollute their environment very quickly. While they can tolerate their own selves, tropical fish will struggle alongside them. Tropical fish require cleaner water.
2. They are cold-water fish. The ideal water temperature for goldfish is about 10-15 degrees cooler than what is best for tropical fish. This means, if you have goldfish and tropical fish together, one or the other will be under constant stress.
3. Goldfish require larger tanks than most people realize. Every species of goldfish grows too large for a bowl, or even a 10-gallon tank. The minimum tank size is 20 gallons for a single fish, with an extra 10 gallons for each addition fish. Unless you have a very large tank, you really shouldn’t have a bunch of goldfish, unless you expect to re-home them to a pond as they get larger.
4. Finally, most goldfish have long, flowing fins. Many fish will nip and them, causing them stress.
So, in summary, it is best to keep goldfish alone. If the tank is large enough, they may live with other goldfish, but they should not live with tropical fish.