This fish is not common where I am, but twice I have been able to acquire a group. Get as many as you can (meaning, as your tank will realistically support), I would myself start with 15-20. As far as I know they will be wild caught (in NA anyway) so very soft and acidic water. I have found this species to stay sort of mid-tank, not so much near the surface as for example Nannostomus eques, which would also go well here (I've always had these two together, simply because they have basically identical requirements in all respects and do complement each other well). I will post the profile of N. marginatus I authored for another site below.
A very similar fish, but being incredibly brightly coloured red, is Nannostomus mortenthaleri. This fish was first discovered in 2000 in a collection of fish from the Rio Nanay near the town of Alvarenga in Peru. First described as a sub-species of Nannostomus marginatus by Paepke & Arendt (2001), it was subsequently established as a valid distinct species by Weitzman et.al. in 2001. The species epithet honours the Austrian aquarist Martin Mortenthaler who owns the fish export company Aquarium Rio Momon which made the collection in which this beautiful pencilfish was discovered.
Nannostomus marginatus
Family: Lebiasinidae, Subfamily Pyrrhulininae
Common Name: Dwarf Pencilfish
Origin and Habitat: Widespread over the Amazon basin in tributary streams of the Rio Negro; also in Guyana and Suriname. Occurs in slow-flow streams and swampy pond areas.
Compatibility/Temperament: Peaceful tetra-like fish, suitable in a species tank or in a community tank of similar small quiet characins, rasbora, small catfish and loaches; good with dwarf cichlids as it tends to remain in the upper half of the tank. Should not be kept with active fish that will be seen as threatening.
Diet Usually will accept most prepared foods like flake and frozen daphnia and bloodworms. Live food such as wingless fruit flies would be a treat. The mouth is very small and permanently open.
Size Maximum 1.4 inches.
Minimum Tank Suggestion 10 gallons for a small group (7-9) but much better in more spacious tanks where the shoal can be 15-20.
Water parameters
Soft (hardness less than 10 dGH) acidic (pH below 7.0) water, temperature 24-26C/75-79F. Wild-caught fish will not last in basic or harder water, and tank-raised fish may survive but will not be as colourful.
Discussion
A lovely colourful miniature fish worthy of its own species biotope tank or in a quiet well-planted community aquarium. Must be kept in a group, at least half a dozen but preferably more, with a good ratio of females to males to avoid males driving the females too hard. Males will challenge each other with no damage. The species prefers the middle and upper levels in the asquarium, swimming and browsing plant leaves.
Females are stockier than males. Spawning will occur in very soft acidic water in a well-planted tank, and follows the standard characin method. Adults will eat the eggs if not removed.
This species is a widespread polymorphic one, with distinct populations occurring in the Guyanas and in several widely-separated areas in the Amazon basin (Weitzman, 1966). At least three distinct colour variants are known. The original description by C.H. Eigenmann in 1909 used specimens collected in Maduni Creek, Guyana. The populations from the lower and upper Amazon basins may prove to be sufficiently different after further study to merit subspecific recognition (Weitzman, 1966). When first discovered, the beautiful coral red dwarf pencilfish [now a distinct species, Nannostomus mortenthaleri] was originally described as a subspecies [see that profile].
This species does not possess an adipose fin. In common with all pencilfish, the fish has a small terminal mouth that is always open, and (except for N. espei) a diurnal colour pattern. During darkness, the horizontal lines break up into a series of dashes. This has been observed in blind fish, showing that it is an automatic response to light/dark and not controlled by the fish.
All pencilfish are presently classified in the tribe Nannostomini in the subfamily Pyrrhulininae. Three different genera (Nannostomus, Nannobrycon and Poecilobrycon) were used at various times until Weitzman & Cobb (1975) placed all species in the single genus, Nannostomus, raised by Gunther in 1872 with N. beckfordi as the type species; Gery (1977) separated them into two genera, Nannostomus and Nannobrycon, largely on the basis of the swimming position. Weitzman & Weitzman in Reis et al. (2003) reassigned the species into the single genus Nannostomus which now includes all described pencilfish, though noting that the two species that swim at an angle may warrant distinct genus status after further analysis. The genus name Nannostomus comes from the Greek meaning "small mouth."
References:
Gery, Jacques (1977) Characoids of the World, TFH Books.
Reis, R.E., S.O. Kullander & C.J. Ferraris Jr. (2003), Check list of the freshwater fishes of South and Central America.
Weitzman, Stanley H. (1966), "Review of South American Characid Fishes of Subtribe Nannostomina," Proceedings of the United States National Museum (Smithsonian Institution), Volume 119, Number 3538.
Weitzman, Stanley H. & J.S. Cobb (1975), "A revision of the South American fishes of the genus Nannostomus Gunther (family Lebiasinidae)," Smithsonian Contributions to Zoology No. 186.