RBI sold dollars in both the offshore and onshore markets, traders said