It's a juvenile Melanotaenia boesemani. Due to its age and size it could be a female or a young male that hasn't matured yet. Most of the bigger rainbowfish don't mature until they are 2 inches long and 3+ months old. Males will develop the blue/ purple on the front half of the body and yellow on the rear half. Females and juveniles look like the fish in the pictures.
The following link has all the known species of Australian & New Guinea rainbowfishes and is worth a look if you keep rainbows.
A website dedicated to Rainbowfishes of Australia and New Guinea
rainbowfish.angfaqld.org.au
------------------
Any idea if your fish is wild caught or captive bred?
All rainbowfish should be kept in groups of 6 or more (preferably 8-10+). You can mix different species together but try to have fish that grow to the same size. Melanotaenia boesemani can reach 4 inches in length (not including the tail). Females are usually a bit smaller.
All rainbowfish need lots of plant matter in their diet. You can keep Duckweed (a floating plant) in the tank for them to eat, but they will also pick at algae and soft leaf plants like Ambulia. This is good for them so put some live plants in for them.
You can use plant based fish foods too. Goldfish food and vege flakes/ pellets are good for rainbowfish like Melanotaenia boesemani.
I'm not sure how big the tank is but Melanotaenia boesemani do best in aquariums that are at least 3 feet long. Try to keep the pH above 7.0 and the GH above 200ppm. The other fishes in the tank (cardinal tetras & danios) come from soft water with a GH below 100ppm and a pH below 7.0. For best long term results, you should get a separate tank for the rainbowfish and give them the conditions they need.
The other reason to separate the rainbowfish is because they will eat small narrow fish like cardinal tetras. We found this out many years ago in the shop when we put 20 x 2 inch long Melanotaenia boesemani into a 6 foot tank that contained about 50 cardinal tetras. They were fine for a couple of days and then one day we noticed the M. boesemani had the cardinal tetras trapped in a corner and were attacking and eating them.