The Nifty and the Sensex opened marginally in the green before slipping into the red following global cues.