Marginal buying was seen in the midcap and smallcap stocks. The Nifty midcap 100 index closed at 55,914.40 after a marginal gain of 13.85 points or 0.02 per cent. Nifty smallcap 100 index closed at 18,265.30 after rising 149.45 points, or 0.83 per cent.