Youtube doesn't endorse such activity as selling and purchase YT-related stuff hence it is not legal in eyes of YT but in any other way it is not illegal too.