Rainbow shark or red-tailed black shark? Look past the tail
Both can show a bright red tail. Wait for a side view that includes the dorsal fin and the smaller fins below the belly.


Start with the dorsal fin
A typical red-tailed black shark has a dark body and dorsal fin with a strongly contrasting tail. On a rainbow shark, orange or red also shows on the dorsal, pelvic and anal fins. Page 36 of Northern Thai Fishes puts the two species on the same page for comparison.
Source · Northern Thai Fishes · Both species on page 36 · U.S. Fish and Wildlife Service · Rainbow shark markings
Look just ahead of the tail
Naturally coloured rainbow sharks have a dark blotch at the tail base. It can disappear against a black aquarium background. Wait until the fish passes a light stone and check the dorsal and lower fins as well. A picture showing only the tail leaves the identification open.
Source · Northern Thai Fishes · Both species on page 36 · U.S. Fish and Wildlife Service · Rainbow shark markings
Should the two fish share a tank?
OATA notes that both species may seem peaceful when young and become more territorial as they grow. For a typical home aquarium, choose one fish from this pair. Look for a retreat at the bottom and a route that lets other fish swim past it.
Source · OATA · Freshwater shark care and territorial behaviour